Skip to content

Conversation

stuartmorgan-g
Copy link
Collaborator

@stuartmorgan-g stuartmorgan-g commented Aug 19, 2025

For all packages that had conditionals to support iOS <13:

  • Update the min Flutter version to 3.35, which requires iOS 13
  • Remove the conditional logic
  • Update all the project metadata to require iOS 13+ (and macOS 10.15+ where applicable)

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 of WithCapacity: 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

Note: The Flutter team is currently trialing the use of Gemini Code Assist for GitHub. Comments from the gemini-code-assist bot 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

  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. 2 3

Copy link

@gemini-code-assist gemini-code-assist bot left a 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];

Choose a reason for hiding this comment

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

medium

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.

Suggested change
NSMutableArray *discounts = [[NSMutableArray alloc] init];
NSMutableArray *discounts = [NSMutableArray arrayWithCapacity:[map[@"discounts"] count]];

@stuartmorgan-g

This comment was marked as resolved.

@stuartmorgan-g
Copy link
Collaborator Author

This is actually ready for review now; apologies for not marking it as a draft when I first posted it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Increase iOS minimum supported version from 12 to 13
1 participant