-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Set plugin template minimum iOS version to 11.0 #122625
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 plugin template minimum iOS version to 11.0 #122625
Conversation
|
@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:
How can I tell which version that shipped with? |
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.
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.
|
@jmagman How did you know which versions? Also, looks like the
|
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 The easiest way to find the corresponding dart version is to checkout the Flutter version and run doctor:
This is why I too haven't done this yet. 🙂 On master on a new plugin the constraint is: 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. |
|
See also #122739 |
|
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. |
(here):
Should we skip to 3.3? We only need 3.1 for this change. |
|
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... |
|
Okay @vashworth I stand corrected, if you update the plugin template to |
|
@jmagman Do you mean 3.3?
It's currently |
Yes.
The spot we're talking about is 2.5
Where do you see 3.3.0? |
Sorry, I meant it's already been changed to 3.3.0 in this PR |
stuartmorgan-g
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 conceptually, just one code cleanup note.
| flutter: ">=3.3.0" | ||
| {{/withPlatformChannelPluginHook}} | ||
| {{#withFfiPluginHook}} | ||
| flutter: ">={{minFrameworkVersionFfiPlugin}}" |
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.
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.
jmagman
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.
Can you also remove this dead @available(iOS 10, *) fallback:
| UIGraphicsBeginImageContextWithOptions(screenshotBounds.size, NO, UIScreen.mainScreen.scale); |
jmagman
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, thanks for the additional cleanup!
stuartmorgan-g
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!
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
///).If you need help, consider asking for advice on the #hackers-new channel on Discord.