What worked for me is a combination of @raffaelli-l-c and @arhan-reddy-busam answer.
Ensure that you do the following:
- Set
MinimumOSVersion
to 9.0 inios/Flutter/AppFrameworkInfo.plist
- Ensure that you uncomment
platform :ios, '9.0'
inios/Podfile
- Ensure that
ios/Podfile
contains the following post install script:
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'] = '9.0'
end
end
end
The following routine works for me when doing my production build:
flutter clean \
&& rm ios/Podfile.lock pubspec.lock \
&& rm -rf ios/Pods ios/Runner.xcworkspace \
&& flutter build ios --build-name=1.0.0 --build-number=1 --release --dart-define=MY_APP_ENV=prod