Why this happens
The warning is about the deployment target of a target inside Pods.xcodeproj, not the deployment target of your app target. CocoaPods generates that project from each pod’s podspec. If a podspec says s.ios.deployment_target = '7.0', the generated Pod target gets IPHONEOS_DEPLOYMENT_TARGET = 7.0. Your app can be set to 9.0 and the warning will still appear.
Xcode compares every target’s deployment target with the range supported by the installed SDK and simulator runtime. In the example, Xcode 10.1 with the iOS 12.1 SDK supports 8.0 through 12.1 for the simulator, so 7.0 is outside the range:
The iOS Simulator deployment targets are set to 7.0, but the range of supported deployment target versions for this platform is 8.0 to 12.1.
The exact numbers change with Xcode and SDK versions; the cause is the same: a Pod target is below the minimum. The warning is usually not fatal. It is still worth fixing because it hides real deployment-target problems and can turn into a build failure when a dependency or SDK stops supporting the old value.
How to fix it
1. Set every Pod target in the Podfile
This is the permanent fix. Add a post_install hook to your Podfile so CocoaPods writes the correct deployment target into every Pod target each time it generates the project.
platform :ios, '15.0'
app_deployment_target = '15.0'
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = app_deployment_target
end
end
end
Replace 15.0 with the deployment target of your app target. The value must be inside the range supported by your Xcode and SDK. If one pod requires a newer iOS version than your app, use that newer value for that pod instead of forcing it down; the goal is to remove values below the SDK minimum, not to make a pod run on an OS it does not support.
Then run:
pod install
Open the .xcworkspace, not the .xcodeproj, and build again. The warning should be gone.
If you use a Podfile with multiple targets, the hook above still works because it walks installer.pods_project.targets. It does not change your app target.
2. Check the Pods project by hand
The accepted manual fix is useful when you want to confirm which target is wrong before changing the Podfile.
- Open the
.xcworkspace. - Select the
Podsproject in the Project navigator. - Select a Pod target.
- Open Build Settings and find Deployment > iOS Deployment Target.
- Change it to your app’s deployment target, or at least to the minimum supported by your SDK.
- Repeat for the other Pod targets and build.
This works, but it is temporary. pod install regenerates Pods.xcodeproj, and the old value can come back. Put the same change in the post_install hook so it survives.
3. Update the pods that declare the old target
Sometimes the old value comes from an outdated podspec. Updating the pod can bring a newer deployment target.
pod update POD_NAME
To refresh the spec repository first:
pod install --repo-update
Check the pod’s changelog or podspec before forcing a higher target. If the pod genuinely supports only an older iOS version, updating may not remove the warning; use the post_install hook with a supported value.
4. Fix your app target too
If your app target is also below the supported range, fix it in Xcode:
- Select the project.
- Select the app target.
- Open General.
- Set Minimum Deployments to a supported iOS version.
- Check Build Settings > Deployment > iOS Deployment Target for the same value.
The warning in the source names the simulator, but the same mismatch can appear for device builds. Keep the app target and Pod targets aligned.
How to prevent it
- Keep
platform :iosin the Podfile, the app target, and the Pod targets on the same supported deployment target. - Commit the
post_installhook so every teammate and CI machine gets the same setting. - Run
pod installafter changing deployment targets, and build the workspace rather than the project. - Do not edit
Pods.xcodeprojas a permanent fix; CocoaPods will overwrite it. - Update dependencies when a pod’s minimum iOS version changes.
FAQ
Does this warning stop my app from building?
Usually no. It is a warning, not an error. It can become a build failure if the deployment target is outside the SDK’s supported range or if a dependency needs a newer iOS version, so fix it rather than ignore it.
Why does the warning say 7.0 when my app target is 9.0?
Because the warning is about a Pod target. Each target in Pods.xcodeproj has its own IPHONEOS_DEPLOYMENT_TARGET, and a podspec can set it to 7.0. Your app target’s setting does not override the Pod target’s setting.
Should I edit the Pods project directly?
Only as a quick check. pod install regenerates Pods.xcodeproj, so manual build-setting changes are lost. Use a post_install hook in the Podfile for the permanent fix.
Parts of this guide are adapted from content licensed under CC BY-SA 4.0; this article is shared under the same license.
