Skip to content
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

Set template and migrate apps to iOS 11 minimum #101963

Merged
merged 1 commit into from
Apr 15, 2022

Conversation

jmagman
Copy link
Member

@jmagman jmagman commented Apr 15, 2022

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

Note this does not change the plugin minimum support version, tracked separately in #101961

See also #62902 and #85174

Fixes #101960

Pre-launch Checklist

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

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

@jmagman jmagman added platform-ios iOS applications specifically tool Affects the "flutter" command-line tool. See also t: labels. t: xcode "xcodebuild" on iOS and general Xcode project management labels Apr 15, 2022
@jmagman jmagman self-assigned this Apr 15, 2022
@flutter-dashboard flutter-dashboard bot added d: api docs Issues with https://api.flutter.dev/ d: examples Sample code and demos documentation f: integration_test The flutter/packages/integration_test plugin team Infra upgrades, team productivity, code health, technical debt. See also team: labels. labels Apr 15, 2022
@@ -759,7 +759,7 @@ Future<void> _writeIOSPluginRegistrant(FlutterProject project, List<Plugin> plug
final List<Map<String, Object?>> iosPlugins = _extractPlatformMaps(methodChannelPlugins, IOSPlugin.kConfigKey);
final Map<String, Object> context = <String, Object>{
'os': 'ios',
'deploymentTarget': '9.0',
'deploymentTarget': '11.0',
Copy link
Member Author

Choose a reason for hiding this comment

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

This is not used for published plugins, it's generated for app and modules that need to import plugins.

const String deploymentTargetOriginal9 = 'IPHONEOS_DEPLOYMENT_TARGET = 9.0;';

// Podfile changes.
const String podfilePlatformVersionOriginal = "platform :ios, '9.0'";
Copy link
Member Author

Choose a reason for hiding this comment

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

New Podfile migration logic.

-platform :ios, '9.0'
+platform :ios, '11.0'

@jmagman
Copy link
Member Author

jmagman commented Apr 15, 2022

I can split the integration test/examples out into their own review if this is too many files, hopefully they are easy to review since those diffs are all the same, and very small.

@jmagman jmagman requested a review from zanderso April 15, 2022 17:17
Copy link
Contributor

@cyanglaz cyanglaz left a comment

Choose a reason for hiding this comment

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

LGTM


if (line.contains(deploymentTargetOriginal8)
|| line.contains(deploymentTargetOriginal9)
|| line.contains(podfilePlatformVersionOriginal)) {
if (!migrationRequired) {
Copy link
Contributor

Choose a reason for hiding this comment

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

This is existing code, but I'm a little confused and try to understand this. Why do we still migrate if !migrationRequired.

Copy link
Member

Choose a reason for hiding this comment

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

Ahh, because .migrateLine() is being for each line in processFileLines, and if .migrateLine() returns non-null (as it does in this codepath), it will set migrationRequired = true, so that print will not show for subsequent lines.

Copy link
Member Author

Choose a reason for hiding this comment

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

Exactly, the next line is // Only print for the first discovered change found.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah ok. Sounds familiar, I probably asked the same question before and forgot about it.

When looking at the whole file, it makes sense but it might be a little confusing when doing inline reviewing like this.

Copy link
Member

@christopherfujino christopherfujino left a comment

Choose a reason for hiding this comment

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

LGTM

@fluttergithubbot fluttergithubbot merged commit 1756ccc into flutter:master Apr 15, 2022
@jmagman jmagman deleted the migrate-ios11 branch April 15, 2022 18:50
engine-flutter-autoroll added a commit to engine-flutter-autoroll/plugins that referenced this pull request Apr 15, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Apr 21, 2022
auto-submit bot pushed a commit that referenced this pull request Jan 2, 2024
1. Change templates to `IPHONEOS_DEPLOYMENT_TARGET`, `MinimumOSVersion`, and Podfile `platform :ios` to 12.0.
2. Add migrator for Podfile part to migrate `platform :ios, '11.0'` -> `platform :ios, '12.0'`
3. Compile with `-miphoneos-version-min=12.0`
4. Run the migrator on all example apps and integration tests.

See also #62902 and #85174 and #101963

Fixes #136060
auto-submit bot added a commit that referenced this pull request Jan 2, 2024
Reverts #140478
Initiated by: loic-sharma
This change reverts the following previous change:
Original Description:
1. Change templates to `IPHONEOS_DEPLOYMENT_TARGET`, `MinimumOSVersion`, and Podfile `platform :ios` to 12.0.
2. Add migrator for Podfile part to migrate `platform :ios, '11.0'` -> `platform :ios, '12.0'`
3. Compile with `-miphoneos-version-min=12.0`
4. Run the migrator on all example apps and integration tests.

See also #62902 and #85174 and #101963

Fixes #136060
auto-submit bot pushed a commit that referenced this pull request Jan 3, 2024
Reland #140478 with `ios_content_validation_test` test fix.
```
[ios_content_validation_test] Process terminated with exit code 0.
Task result:
{
  "success": true,
  "data": null,
  "detailFiles": [],
  "benchmarkScoreKeys": [],
  "reason": "success"
}

```

__________

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

See also #62902 and #85174 and #101963

Fixes #136060
jmagman added a commit to jmagman/flutter that referenced this pull request Jan 3, 2024
Reland flutter#140478 with `ios_content_validation_test` test fix.
```
[ios_content_validation_test] Process terminated with exit code 0.
Task result:
{
  "success": true,
  "data": null,
  "detailFiles": [],
  "benchmarkScoreKeys": [],
  "reason": "success"
}

```

__________

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

See also flutter#62902 and flutter#85174 and flutter#101963

Fixes flutter#136060
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
d: api docs Issues with https://api.flutter.dev/ d: examples Sample code and demos f: integration_test The flutter/packages/integration_test plugin platform-ios iOS applications specifically t: xcode "xcodebuild" on iOS and general Xcode project management team Infra upgrades, team productivity, code health, technical debt. See also team: labels. tool Affects the "flutter" command-line tool. See also t: labels.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Increase app minimum supported iOS version from 9.0 to 11.0
4 participants