Skip to content

Conversation

@vashworth
Copy link
Contributor

@vashworth vashworth commented Mar 14, 2023

When creating a new package, set the minimum iOS version to 11.0. Also, update integration_test package minimum iOS version to 11.0.

Fixes #101961.

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.

@flutter-dashboard flutter-dashboard bot added the tool Affects the "flutter" command-line tool. See also t: labels. label Mar 14, 2023
@vashworth
Copy link
Contributor Author

vashworth commented Mar 14, 2023

@jmagman I was working with plugins and noticed this so I thought I'd just fix it, but just discovered you already had the issue for it assigned to you #101961. Hopefully you haven't worked on it yet and this will save you some time.

One thing, in the issue it says:

Up the Flutter SDK constraint to whatever version #101960 ships on to enforce that the 11.0 migration has happened on the app side.

How can I tell which version that shipped with?

@flutter-dashboard flutter-dashboard bot added framework flutter/packages/flutter repository. See also f: labels. f: integration_test The flutter/packages/integration_test plugin c: contributor-productivity Team-specific productivity, code health, technical debt. labels Mar 14, 2023
@vashworth vashworth requested a review from jmagman March 14, 2023 22:52
Copy link
Member

@jmagman jmagman left a comment

Choose a reason for hiding this comment

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

This would also require the plugin template pubspec to enforce that it can only be used when running Flutter 3.3 or higher, since that's the version where we increased the app minimum version to iOS 11.

environment:
  sdk: ">=2.18.0 <3.0.0"
  flutter: ">=3.3.0"

Otherwise apps running with an older version of Flutter with a 9.0 minimum could try to use the plugin, pub would let since the constraints are fine, and then they would get a native iOS compilation error when the plugin iOS target minimum is too high to be linked on by the app target.

@vashworth
Copy link
Contributor Author

@jmagman How did you know which versions?

Also, looks like the sdk version is now dynamic so I did not change it:


final String dartSdk = globals.cache.dartSdkBuild;

dartSdkVersionBounds: "'>=$dartSdk <4.0.0'",

@jmagman
Copy link
Member

jmagman commented Mar 15, 2023

@jmagman How did you know which versions?

Actually it's Flutter 3.1, not 3.3. #101963 was first available in 3.1, and that dart version was 2.18.0, so sdk: ">=2.18.0 <3.0.0" is still the right dart range.

The easiest way to find the corresponding dart version is to checkout the Flutter version and run doctor:

$ git checkout 3.1.0
$ flutter doctor -v
...
[✓] Flutter (Channel unknown, 3.1.0, on macOS 13.2.1 22D68 darwin-x64, locale en-US)
...
    • Dart version 2.18.0 (build 2.18.0-44.1.beta)

Also, looks like the sdk version is now dynamic so I did not change it:

This is why I too haven't done this yet. 🙂

On master on a new plugin the constraint is:

environment:
  sdk: '>=3.0.0-322.0.dev <4.0.0'
  flutter: ">=2.5.0"

I think we should hold off on this for now until we know what the plan is to increase these versions. Fortunately this isn't that urgent, if plugin authors want to adjust these constraints manually, they can, but worst case they keep supporting older versions of Flutter, which isn't a bad thing.

@jmagman
Copy link
Member

jmagman commented Mar 15, 2023

So this is be blocked on #118837, which is actively being worked on #122546
You can either close and wait for all that to settle and re-open, or you can convert this to a draft until that's done.

@vashworth vashworth marked this pull request as draft March 15, 2023 18:15
@jmagman
Copy link
Member

jmagman commented Mar 15, 2023

See also #122739

@stuartmorgan-g
Copy link
Contributor

I think just changing the (comically old) 2.5 to 3.3 is fine here, rather than blocking this. I don't see any downside to doing so while we figure out a longer term plan; it's not worse, and it won't make the long-term change any harder.

@jmagman
Copy link
Member

jmagman commented Mar 15, 2023

I think just changing the (comically old) 2.5 to 3.3 is fine here

(here):

Should we skip to 3.3? We only need 3.1 for this change.

@stuartmorgan-g
Copy link
Contributor

I would do 3.3 rather than 3.1, since 3.3 is the oldest stable with what we need. Hard-coding an old beta version seems weird.

@jmagman
Copy link
Member

jmagman commented Mar 15, 2023

I would do 3.3 rather than 3.1, since 3.3 is the oldest stable with what we need. Hard-coding an old beta version seems weird.

Oh you're right, I forgot 3.1 was just a stable candidate. That versioning is confusing...

@jmagman
Copy link
Member

jmagman commented Mar 15, 2023

Okay @vashworth I stand corrected, if you update the plugin template to flutter: '>=3.1.0' flutter: '>=3.3.0' then this isn't blocked! Thanks @stuartmorgan for jumping in with context.

@vashworth
Copy link
Contributor Author

vashworth commented Mar 15, 2023

@jmagman Do you mean 3.3?

I would do 3.3 rather than 3.1, since 3.3 is the oldest stable

Oh you're right, I forgot 3.1 was just a stable candidate. That versioning is confusing...

It's currently 3.3.0, should I change it to 3.3?

@vashworth vashworth marked this pull request as ready for review March 15, 2023 19:21
@jmagman
Copy link
Member

jmagman commented Mar 15, 2023

@jmagman Do you mean 3.3?

Yes.

It's currently 3.3.0, should I change it to 3.3?

The spot we're talking about is 2.5

Where do you see 3.3.0?

@vashworth
Copy link
Contributor Author

Where do you see 3.3.0?

Sorry, I meant it's already been changed to 3.3.0 in this PR

@jmagman jmagman requested a review from stuartmorgan-g March 16, 2023 17:25
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 conceptually, just one code cleanup note.

flutter: ">=3.3.0"
{{/withPlatformChannelPluginHook}}
{{#withFfiPluginHook}}
flutter: ">={{minFrameworkVersionFfiPlugin}}"
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 2.11, so the branching for flutter: here, and minFrameworkVersionFfiPlugin in all of the code, can be eliminated now. It only existed because the platform channel version was lower than the FFI version, which is no longer the case.

Copy link
Member

@jmagman jmagman left a comment

Choose a reason for hiding this comment

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

Can you also remove this dead @available(iOS 10, *) fallback:

UIGraphicsBeginImageContextWithOptions(screenshotBounds.size, NO, UIScreen.mainScreen.scale);

Copy link
Member

@jmagman jmagman left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for the additional cleanup!

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!

@vashworth vashworth added the autosubmit Merge PR when tree becomes green via auto submit App label Mar 21, 2023
@auto-submit auto-submit bot merged commit 9136a47 into flutter:master Mar 21, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 22, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 22, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 22, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 22, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 22, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 22, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 23, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 23, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 23, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 23, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 10, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 10, 2023
@vashworth vashworth deleted the plugin_template_ios_default_os branch September 27, 2023 15:36
@vashworth vashworth restored the plugin_template_ios_default_os branch September 27, 2023 15:36
auto-submit bot pushed a commit that referenced this pull request Feb 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

autosubmit Merge PR when tree becomes green via auto submit App c: contributor-productivity Team-specific productivity, code health, technical debt. f: integration_test The flutter/packages/integration_test plugin framework flutter/packages/flutter repository. See also f: 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 plugin template minimum supported iOS version from 9.0 to 11.0, match Flutter SDK constraint

3 participants