-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Description
We have (probably incorrect) deployment instructions that tell the developer to update ios/Flutter/AppframeworkInfo.plist to match the iOS app deployment version (see #175334 for an example of the confusion). However that plist should match the App binary -miphoneos-version-min, not the app-level deployment target.
flutter/packages/flutter_tools/lib/src/base/build.dart
Lines 268 to 271 in c9608e2
| // When the minimum version is updated, remember to update | |
| // template MinimumOSVersion. | |
| // https://github.com/flutter/flutter/pull/62902 | |
| '-miphoneos-version-min=${FlutterDarwinPlatform.ios.deploymentTarget()}', |
flutter/packages/flutter_tools/lib/src/build_system/targets/ios.dart
Lines 864 to 867 in c9608e2
| if (environmentType == EnvironmentType.physical) | |
| '-miphoneos-version-min=${FlutterDarwinPlatform.ios.deploymentTarget()}' | |
| else | |
| '-miphonesimulator-version-min=${FlutterDarwinPlatform.ios.deploymentTarget()}', |
Instead of checking MinimumOSVersion into the project via the create template, we could instead remove that key from the template, have a migration to remove it from AppframeworkInfo.plist, and instead when the plist is copied to the App.framework, dynamically add the MinimumOSVersion with plutil and the correct value.
flutter/packages/flutter_tools/lib/src/build_system/targets/ios.dart
Lines 725 to 727 in c9608e2
| flutterProject.ios.appFrameworkInfoPlist.copySync( | |
| environment.outputDir.childDirectory('App.framework').childFile('Info.plist').path, | |
| ); |
Once it's in stable, remove the deployment instructions with a note that "after Flutter 3.x this section is no longer needed"