Problem Description
When building a Flutter iOS project, you may encounter multiple warnings about the iOS deployment target being set incorrectly:
warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 11.0, but the range of supported deployment target versions is 12.0 to 18.0.99. (in target 'GoogleSignIn' from project 'Pods')
These warnings appear for various pods including GoogleAppMeasurement, FirebaseAuth, GoogleUtilities, vibration, nanopb, BoringSSL-GRPC, gRPC-Core, and gRPC-C++.
Root Cause
This issue occurs because:
- Different pods have different minimum iOS version requirements
- Your project's iOS deployment target is set lower than what some pods support
- The Podfile isn't configured to enforce a consistent deployment target across all dependencies
Recommended iOS Deployment Targets
For new projects, consider these minimum deployment targets:
- iOS 13.0: Recommended minimum (supports 95%+ of active devices)
- iOS 14.0: For projects using newer iOS features
- iOS 15.0: For cutting-edge apps with latest capabilities
Complete Solution
- Update AppFrameworkInfo.plist
- Navigate to ios/Flutter/AppFrameworkInfo.plist and set a minimum OS version:
<key>MinimumOSVersion</key> <string>13.0</string>
- Configure Podfile Platform
- In your ios/Podfile, set the platform to iOS 13.0 or higher:
platform :ios, '13.0'
- In your ios/Podfile, set the platform to iOS 13.0 or higher:
- Add Modern Post-Install Script
- Add this updated post-install script to your ios/Podfile:
post_install do |installer| installer.pods_project.targets.each do |target| flutter_additional_ios_build_settings(target) target.build_configurations.each do |config| config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '13.0' end end end
- Update Xcode Project Settings
- Open ios/Runner.xcworkspace in Xcode 16.4
- Select the Runner project in the navigator
- Under Deployment Info, set iOS Deployment Target to 13.0
- Repeat for any extension targets if applicable
- Clean and Rebuild
# Complete project cleanup flutter clean rm -rf ios/Podfile.lock rm -rf ios/Pods rm -rf ios/Runner.xcworkspace rm -rf ios/.symlinks # Fresh rebuild flutter pub get cd ios && pod install cd .. && flutter build ios --no-codesign
Why This Solution Works
- AppFrameworkInfo.plist: Sets the minimum iOS version for the Flutter framework itself
- Podfile platform: Defines the minimum iOS version for CocoaPods dependencies
- Post-install script: Forces all pods to use the same deployment target, overriding individual pod settings
- Clean rebuild: Ensures all cached configurations are updated
Troubleshooting
If you continue to see warnings after following these steps:
- Verify all three files are updated correctly
- Run a complete clean and rebuild
- Check for any custom pod configurations that might override these settings
- Ensure your Xcode project settings match the Podfile configuration
Interested in MacinCloud Managed Servers?
Visit the Managed Server Plan page to obtain a Managed server.
Do you require full root/admin privileges on a MacinCloud Server?
Find out more about MacinCloud Dedicated Server Plans.