Skip to content

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 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
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 14, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 14, 2025
romanejaquez pushed a commit to romanejaquez/flutter that referenced this pull request Aug 14, 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):
* flutter/buildroot#808
* flutter/buildroot#574

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

Issue: flutter#167735

## Pre-launch Checklist

- [X] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [X] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [X] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [X] I signed the [CLA].
- [X] I listed at least one issue that this PR fixes in the description
above.
- [X] I updated/added relevant documentation (doc comments with `///`).
- [X] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [X] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [X] All existing and new tests are passing.

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

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
romanejaquez pushed a commit to romanejaquez/flutter that referenced this pull request Aug 14, 2025
After migrating our iOS deployment target to 13.0 in flutter#167737, these
checks are no longer necessary.

Issue: flutter#167735

## Pre-launch Checklist

- [X] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [X] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [X] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [X] I signed the [CLA].
- [X] I listed at least one issue that this PR fixes in the description
above.
- [X] I updated/added relevant documentation (doc comments with `///`).
- [X] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [X] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [X] All existing and new tests are passing.

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

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 15, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 15, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 16, 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