Swift: 'X' is only available in iOS 16.0 or newer
You used an API that requires a newer iOS than your deployment target.
Seen on:
iOS
Meaning
Either raise the deployment target, or guard the call with if #available / @available and provide a fallback.
Common causes
- Deployment target lower than the API’s availability
- Copying sample code written for a newer iOS
- SwiftUI modifiers introduced in newer releases
⚡ Quick fix
- Wrap with if #available(iOS 16, *) { … } else { … }
- Raise IPHONEOS_DEPLOYMENT_TARGET if you can drop older iOS
- Mark the containing function @available
Detailed fix by platform
Swift
- swift
if #available(iOS 16.0, *) { NavigationStack { content } } else { NavigationView { content } }
How to diagnose
- Target — Deployment target
- API — Availability in docs
🔧 Still not fixed?
Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:
Similar errors
Most viewed in iOS
Other ways to find it
🧠 Still stuck? Analyze your error
Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.
Was this page helpful?
Report a correction or suggest an improvement
Last updated 7 Oct 2026