-
Notifications
You must be signed in to change notification settings - Fork 3.6k
[various] Scrub pre-iOS-13 code #9849
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request effectively removes support for iOS versions older than 13.0 across several packages, which simplifies the codebase by removing conditional logic and updating deployment targets. The changes are well-executed and include valuable refactoring in in_app_purchase_storekit to improve code clarity and performance by using dictionary literals and pre-allocating array capacities. I've found one minor inconsistency in the test stubs related to array initialization that could be addressed for better consistency with the rest of the changes.
| } | ||
|
|
||
| [self setValue:discounts forKey:@"discounts"]; | ||
| NSMutableArray *discounts = [[NSMutableArray alloc] init]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For consistency with the other changes in this PR, it would be better to initialize this mutable array with a specific capacity, since the size is known. You've done this in FIAObjectTranslator.m, and applying the same pattern here would be a nice touch.
| NSMutableArray *discounts = [[NSMutableArray alloc] init]; | |
| NSMutableArray *discounts = [NSMutableArray arrayWithCapacity:[map[@"discounts"] count]]; |
This comment was marked as resolved.
This comment was marked as resolved.
|
This is actually ready for review now; apologies for not marking it as a draft when I first posted it. |
| return biometrics | ||
| } | ||
| if context.biometryType == LABiometryType.faceID { | ||
| biometrics.append(AuthBiometric.face) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this not need to return?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It doesn't actually matter, and the early return confused someone in an earlier review of adjacent code so I thought I'd remove it.
If you look at the context, this is structured as conditionally populating an array with potentially multiple elements, but in practice only one entry ever ends up in the array because biometryType is a singular value. So this early return doesn't do anything different from the return ~6 lines down.
vashworth
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
flutter/packages@5d785a0...42bb347 2025-09-03 [email protected] [google_maps_flutter] Fixes exception when dispose is called while asynchronous update from didUpdateWidget is executed (flutter/packages#9227) 2025-09-03 [email protected] [google_maps_flutter] Add cameraControl enable/disable & position on web (flutter/packages#9089) 2025-09-03 [email protected] [tool] Only license-check checked-in files (flutter/packages#9905) 2025-09-03 [email protected] [interactive_media_ads] Fixes preloading ad while another was playing on Android (flutter/packages#9904) 2025-09-02 [email protected] Update FWFWebViewFlutterWKWebViewExternalAPITests.swift (flutter/packages#9922) 2025-09-02 [email protected] Update Stubs for FlutterPluginRegistrar interface change (flutter/packages#9923) 2025-09-02 [email protected] [camera_android_camerax] Update Android minimum SDK version (flutter/packages#9945) 2025-09-02 [email protected] Roll Flutter from da5523a to 6b18740 (49 revisions) (flutter/packages#9926) 2025-09-02 [email protected] [various] Scrub pre-iOS-13 code (flutter/packages#9849) 2025-09-02 [email protected] [google_maps_flutter_web] Add cameraControl enable/disable & position on web (flutter/packages#9921) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages-flutter-autoroll Please CC [email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
flutter/packages@5d785a0...42bb347 2025-09-03 [email protected] [google_maps_flutter] Fixes exception when dispose is called while asynchronous update from didUpdateWidget is executed (flutter/packages#9227) 2025-09-03 [email protected] [google_maps_flutter] Add cameraControl enable/disable & position on web (flutter/packages#9089) 2025-09-03 [email protected] [tool] Only license-check checked-in files (flutter/packages#9905) 2025-09-03 [email protected] [interactive_media_ads] Fixes preloading ad while another was playing on Android (flutter/packages#9904) 2025-09-02 [email protected] Update FWFWebViewFlutterWKWebViewExternalAPITests.swift (flutter/packages#9922) 2025-09-02 [email protected] Update Stubs for FlutterPluginRegistrar interface change (flutter/packages#9923) 2025-09-02 [email protected] [camera_android_camerax] Update Android minimum SDK version (flutter/packages#9945) 2025-09-02 [email protected] Roll Flutter from da5523a to 6b18740 (49 revisions) (flutter/packages#9926) 2025-09-02 [email protected] [various] Scrub pre-iOS-13 code (flutter/packages#9849) 2025-09-02 [email protected] [google_maps_flutter_web] Add cameraControl enable/disable & position on web (flutter/packages#9921) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages-flutter-autoroll Please CC [email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
flutter/packages@5d785a0...42bb347 2025-09-03 [email protected] [google_maps_flutter] Fixes exception when dispose is called while asynchronous update from didUpdateWidget is executed (flutter/packages#9227) 2025-09-03 [email protected] [google_maps_flutter] Add cameraControl enable/disable & position on web (flutter/packages#9089) 2025-09-03 [email protected] [tool] Only license-check checked-in files (flutter/packages#9905) 2025-09-03 [email protected] [interactive_media_ads] Fixes preloading ad while another was playing on Android (flutter/packages#9904) 2025-09-02 [email protected] Update FWFWebViewFlutterWKWebViewExternalAPITests.swift (flutter/packages#9922) 2025-09-02 [email protected] Update Stubs for FlutterPluginRegistrar interface change (flutter/packages#9923) 2025-09-02 [email protected] [camera_android_camerax] Update Android minimum SDK version (flutter/packages#9945) 2025-09-02 [email protected] Roll Flutter from da5523a to 6b18740 (49 revisions) (flutter/packages#9926) 2025-09-02 [email protected] [various] Scrub pre-iOS-13 code (flutter/packages#9849) 2025-09-02 [email protected] [google_maps_flutter_web] Add cameraControl enable/disable & position on web (flutter/packages#9921) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages-flutter-autoroll Please CC [email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
For all packages that have not already done so: - Ensure that the minimum iOS version is 13. - Ensure that the minimum macOS version is 10.15. - Ensure that the minimum Flutter SDK version in 3.35 for anything with changes from the above. In #9849 I did the iOS plugins that had conditional logic for iOS <13, but I forgot to follow up with updating the minimum for the plugins that didn't have conditional logic. Because this changes min Dart SDKs, it causes autoformat changes. There are no actual code changes in this PR; all Dart file changes are purely the result of re-running `dart format`. This does bump the versions, even though repo policy would allow skipping version bumps for only changing min requirements, just to avoid conflating all the changes here with future releases. Part of flutter/flutter#167735 Part of flutter/flutter#167745 ## Pre-Review Checklist [^1]: Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling.
flutter/packages@5d785a0...42bb347 2025-09-03 [email protected] [google_maps_flutter] Fixes exception when dispose is called while asynchronous update from didUpdateWidget is executed (flutter/packages#9227) 2025-09-03 [email protected] [google_maps_flutter] Add cameraControl enable/disable & position on web (flutter/packages#9089) 2025-09-03 [email protected] [tool] Only license-check checked-in files (flutter/packages#9905) 2025-09-03 [email protected] [interactive_media_ads] Fixes preloading ad while another was playing on Android (flutter/packages#9904) 2025-09-02 [email protected] Update FWFWebViewFlutterWKWebViewExternalAPITests.swift (flutter/packages#9922) 2025-09-02 [email protected] Update Stubs for FlutterPluginRegistrar interface change (flutter/packages#9923) 2025-09-02 [email protected] [camera_android_camerax] Update Android minimum SDK version (flutter/packages#9945) 2025-09-02 [email protected] Roll Flutter from da5523a to 6b18740 (49 revisions) (flutter/packages#9926) 2025-09-02 [email protected] [various] Scrub pre-iOS-13 code (flutter/packages#9849) 2025-09-02 [email protected] [google_maps_flutter_web] Add cameraControl enable/disable & position on web (flutter/packages#9921) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages-flutter-autoroll Please CC [email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
For all packages that had conditionals to support iOS <13:
There is also some minor cleanup in
in_app_purchase_storekit; just removing conditionals would have left cases where we were unnecessarily constructing dictionaries dynamically, so I folded them into the initial dictionary construction, and while doing that I noticed some cases where we were doing other unnecessary dynamic construction (maybe due to previous OS conditionals?) so I updated those as well. And then I noticed some inconsistency in use ofWithCapacity:and updated those cases to be consistent. Lastly, I fixed a few stale comments that didn't reflect the current state of the code.Includes autoformat changes, since updating the min Dart SDK opts into some formatter changes.
Fixes flutter/flutter#167735
Pre-Review Checklist
[shared_preferences]pubspec.yamlwith an appropriate new version according to the pub versioning philosophy, or I have commented below to indicate which version change exemption this PR falls under1.CHANGELOG.mdto add a description of the change, following repository CHANGELOG style, or I have commented below to indicate which CHANGELOG exemption this PR falls under1.///).Note: The Flutter team is currently trialing the use of Gemini Code Assist for GitHub. Comments from the
gemini-code-assistbot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed.Footnotes
Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling. ↩ ↩2 ↩3