Skip to content

iOS: Update minimum iOS version to 13.0 #167737

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Apr 24, 2025

Conversation

cbracken
Copy link
Member

@cbracken cbracken commented Apr 24, 2025

This updates the Flutter minimum iOS version from 12.0 to 13.0, adds a migrator for existing apps, and updates our own examples, tests, and benchmark apps to 13.0. A follow-up patch will drop iOS 13 @available checks in the embedder.

This is required in order to use Swift in the embedder and not need to bundle the Swift runtime libs in every app that uses Flutter. Swift stable ABI

As of March 2025, usage of iOS is well below 1%, see example public usage data here:
https://telemetrydeck.com/survey/apple/iOS/majorSystemVersions/

This patch makes the following changes:

  1. Updates ios_deployment_target from 12.0 to 13.0.
  2. Changes templates to IPHONEOS_DEPLOYMENT_TARGET, MinimumOSVersion, and Podfile platform :ios to 12.0.
  3. Adds migrator for Podfile part to migrate platform :ios, '11.0' -> platform :ios, '12.0'
  4. Compiles with -miphoneos-version-min=12.0
  5. Runs the migrator on all example apps and integration tests.
  6. Updates examples, tests to iOS 13 deployment target

It also updates verify_exported.dart:

  • iOS 13 introduces stricter separation of const and non-const global symbols. Previously, these were declared in the Mach-O __DATA section which may be mapped read-write, but now they're in a dedicated __DATA_CONST section which is mapped read-only. This adds (__DATA_CONST,__const) to the allowlist with the same enforcement on exported symbol naming as before.

See also (ios_deployment_target):

See also (template, migrator):

Issue: #167735

Pre-launch Checklist

If you need help, consider asking for advice on the #hackers-new channel on Discord.

1. Update ios_deployment_target from 12.0 to 13.0.
2. Change templates to `IPHONEOS_DEPLOYMENT_TARGET`, `MinimumOSVersion`, and Podfile `platform :ios` to 12.0.
3. Add migrator for Podfile part to migrate `platform :ios, '11.0'` -> `platform :ios, '12.0'`
4. Compile with `-miphoneos-version-min=12.0`
5. Run the migrator on all example apps and integration tests.

See also (ios_deployment_target):
* flutter/buildroot#808
* flutter/buildroot#574

See also (template, migrator):
* flutter#62902
* flutter#85174
* flutter#101963
* flutter#140478

Issue: flutter#167735
@cbracken cbracken requested review from a team, matanlurey and vashworth as code owners April 24, 2025 16:30
@github-actions github-actions bot added a: tests "flutter test", flutter_test, or one of our tests platform-ios iOS applications specifically tool Affects the "flutter" command-line tool. See also t: labels. framework flutter/packages/flutter repository. See also f: labels. engine flutter/engine repository. See also e: labels. d: examples Sample code and demos f: integration_test The flutter/packages/integration_test plugin team-ios Owned by iOS platform team labels Apr 24, 2025
@cbracken cbracken changed the title iOS: Update template minimum iOS version to 13.0 iOS: Update minimum iOS version to 13.0 Apr 24, 2025
Copy link
Contributor

@stuartmorgan-g stuartmorgan-g left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Allow symbols in (__DATA_CONST,__const) table so long as they meet the
naming requirements for exported Flutter symbols.
@cbracken cbracken added the autosubmit Merge PR when tree becomes green via auto submit App label Apr 24, 2025
@cbracken cbracken added this pull request to the merge queue Apr 24, 2025
Merged via the queue into flutter:master with commit 09d4dab Apr 24, 2025
178 checks passed
@cbracken cbracken deleted the bump-ios-minimum-to-13 branch April 24, 2025 20:54
@flutter-dashboard flutter-dashboard bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Apr 24, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Apr 25, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Apr 25, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 3, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 4, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 5, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 5, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 5, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 5, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 5, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 5, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 5, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 5, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 6, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 6, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 6, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 6, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 7, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 7, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 7, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 7, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 7, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 7, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 7, 2025
cbracken added a commit to cbracken/flutter that referenced this pull request May 9, 2025
Previously updated for non-Swift in flutter#167737.
cbracken added a commit to cbracken/flutter that referenced this pull request May 13, 2025
cbracken added a commit to cbracken/flutter that referenced this pull request May 13, 2025
cbracken added a commit to cbracken/flutter that referenced this pull request May 13, 2025
cbracken added a commit to cbracken/flutter that referenced this pull request May 13, 2025
cbracken added a commit to cbracken/flutter that referenced this pull request May 13, 2025
cbracken added a commit to cbracken/flutter that referenced this pull request May 14, 2025
cbracken added a commit to cbracken/flutter that referenced this pull request May 14, 2025
cbracken added a commit to cbracken/flutter that referenced this pull request May 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a: tests "flutter test", flutter_test, or one of our tests d: examples Sample code and demos engine flutter/engine repository. See also e: labels. f: integration_test The flutter/packages/integration_test plugin framework flutter/packages/flutter repository. See also f: labels. platform-ios iOS applications specifically team-ios Owned by iOS platform team tool Affects the "flutter" command-line tool. See also t: labels.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants