[CP-beta][native assets] Bump minimum iOS version from 13 to 15 (#192507)
This pull request is created by [automatic cherry pick workflow](https://github.com/flutter/flutter/blob/main/docs/releases/Flutter-Cherrypick-Process.md#automatically-creates-a-cherry-pick-request)
Please fill in the form below, and a flutter domain expert will evaluate this cherry pick request.
### Issue Link:
What is the link to the issue this cherry-pick is addressing?
https://github.com/flutter/flutter/issues/https://github.com/dart-lang/native/issues/3594
### Impact Description:
What is the impact (ex. visual jank on Samsung phones, app crash, cannot ship an iOS app)?
Does it impact development (ex. flutter doctor crashes when Android Studio is installed),
or the shipping of production apps (the app crashes on launch).
This information is for domain experts and release engineers to understand the consequences of saying yes or no to the cherry pick.
Developers cannot submit iOS apps to App Store Connect / TestFlight when using native assets compiled with -mios-version-min >= 14 (such as libraries using C++20).
This impacts shipping production apps. Apple rejects the uploaded IPA with error ITMS-90208: Invalid Bundle because flutter_tools generates a framework Info.plist with MinimumOSVersion = 13.0, conflicting with the binary's higher OS requirement.
### Changelog Description:
Explain this cherry pick:
* In one line that is accessible to most Flutter developers.
* That describes the state prior to the fix.
* That includes which platforms are impacted.
See [best practices](https://github.com/flutter/flutter/blob/main/docs/releases/Hotfix-Documentation-Best-Practices.md) for examples.
[flutter/191964](https://github.com/flutter/flutter/pull/191964): On iOS, apps bundling native assets fail App Store submission when native libraries are compiled with deployment targets above iOS 13.
### Workaround:
Is there a workaround for this issue?
Manually edit Info.plist inside Runner.app/Frameworks/<name>.framework/Info.plist in the built archive to set MinimumOSVersion to 15.0, and re-sign the framework and app before uploading to App Store Connect
### Risk:
What is the risk level of this cherry-pick?
### Test Coverage:
Are you confident that your fix is well-tested by automated tests?
### Validation Steps:
What are the steps to validate that this fix works?
1) Build an iOS app with native assets: flutter build ios --release --no-codesign.
2) Check the framework Info.plist
```
plutil -p build/ios/iphoneos/Runner.app/Frameworks/*.framework/Info.plist | grep MinimumOSVersion
```
3)Confirm it reads "15.0" instead of "13.0"
diff --git a/packages/flutter_tools/lib/src/isolated/native_assets/ios/native_assets.dart b/packages/flutter_tools/lib/src/isolated/native_assets/ios/native_assets.dart
index 68680a9..c6a97e8 100644
--- a/packages/flutter_tools/lib/src/isolated/native_assets/ios/native_assets.dart
+++ b/packages/flutter_tools/lib/src/isolated/native_assets/ios/native_assets.dart
@@ -11,7 +11,7 @@
import '../native_assets.dart';
// TODO(dcharkes): Fetch minimum iOS version from somewhere. https://github.com/flutter/flutter/issues/145104
-const targetIOSVersion = 13;
+const targetIOSVersion = 15;
IOSSdk getIOSSdk(EnvironmentType environmentType) {
return switch (environmentType) {
diff --git a/packages/flutter_tools/test/integration.shard/isolated/native_assets_flutter_build_test.dart b/packages/flutter_tools/test/integration.shard/isolated/native_assets_flutter_build_test.dart
index a2616d6..fac8ba2 100644
--- a/packages/flutter_tools/test/integration.shard/isolated/native_assets_flutter_build_test.dart
+++ b/packages/flutter_tools/test/integration.shard/isolated/native_assets_flutter_build_test.dart
@@ -155,7 +155,7 @@
<key>CFBundleVersion</key>
<string>1.0</string>
<key>MinimumOSVersion</key>
- <string>13.0</string>
+ <string>15.0</string>
</dict>
</plist>''');
}