Skip to content

Added a warning to using the launch engine #170156

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

Closed
wants to merge 2 commits into from

Conversation

gaaclarke
Copy link
Member

@gaaclarke gaaclarke commented Jun 6, 2025

do no land until #169998 lands

fixes #169678

Pre-launch Checklist

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

@gaaclarke gaaclarke requested a review from a team as a code owner June 6, 2025 16:39
@flutter-dashboard
Copy link

It looks like this pull request may not have tests. Please make sure to add tests or get an explicit test exemption before merging.

If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix?

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing.If you believe this PR qualifies for a test exemption, contact "@test-exemption-reviewer" in the #hackers channel in Discord (don't just cc them here, they won't see it!). The test exemption team is a small volunteer group, so all reviewers should feel empowered to ask for tests, without delegating that responsibility entirely to the test exemption group.

@github-actions github-actions bot added platform-ios iOS applications specifically engine flutter/engine repository. See also e: labels. team-ios Owned by iOS platform team labels Jun 6, 2025
@vashworth
Copy link
Contributor

Even after #169998 lands, I don't know that we want to do this. #169998 only handles newly created Flutter apps. This PR will show that warning for every pre-existing Flutter app.

Perhaps we can try to auto-migrate people AppDelegates and then after some time we can introduce this warning?

@gaaclarke
Copy link
Member Author

I don't think we should try to migrate users in this case. We have a lot of work to do, trying to handle the infinite ways people could be running into this will be a big investment (x2 for swift and objc). I think Apple has shown us a good way forward, provide a warning with a generous grace period, then pull the plug.

@vashworth
Copy link
Contributor

vashworth commented Jun 6, 2025

I don't think we should try to migrate users in this case. We have a lot of work to do, trying to handle the infinite ways people could be running into this will be a big investment (x2 for swift and objc). I think Apple has shown us a good way forward, provide a warning with a generous grace period, then pull the plug.

I wasn't thinking we'd try to catch every use case - just the basic use case (if the AppDelegate matches the old template exactly, we can safely change it I think). That would get most users (probably?). Then for users who have done custom things to their AppDelegate, they can migrate manually

@gaaclarke
Copy link
Member Author

If you don't handle every case, wouldn't you still want this warning? Can you file an issue for the mechanism that automatically updates app delegates?

@vashworth
Copy link
Contributor

If you don't handle every case, wouldn't you still want this warning? Can you file an issue for the mechanism that automatically updates app delegates?

Good point, we would still want the warning - but only after the migration code had landed. I think we should also add more documentation on how to migrate this specific use case. Currently the docs are mostly about platform channels: https://docs.flutter.dev/release/breaking-changes/uiscenedelegate#creating-platform-channels-in-application-didfinishlaunchingwithoptions

Filed #170167

@gaaclarke
Copy link
Member Author

I think we should also add more documentation on how to migrate this specific use case. Currently the docs are mostly about platform channels: https://docs.flutter.dev/release/breaking-changes/uiscenedelegate#creating-platform-channels-in-application-didfinishlaunchingwithoptions

@vashworth what were you referring to when you said "this specific use case"? Are you talking about specifically calling out the case where they aren't creating platform channels, they are just using he GeneratedPluginRegistrant?

@gaaclarke
Copy link
Member Author

I think we should also add more documentation on how to migrate this specific use case.

Done flutter/website#12111

I'll leave this PR around until the iOS team decides they want to land it.

@vashworth vashworth self-requested a review June 11, 2025 20:58
gaaclarke added a commit to flutter/website that referenced this pull request Jun 16, 2025
… UISceneDelegate breaking change notice (#12111)

_Description of what this PR is changing or adding, and why:_

This addition was made in response to @vashworth 's request in
flutter/flutter#170156 (comment)

This explicitly lists what to do about the GeneratedPluginRegistrant and
mentions the FlutterLaunchEngine to provide extra context to future
runtime warnings.

_Issues fixed by this PR (if any):_

_PRs or commits this PR depends on (if any):_

## Presubmit checklist

- [x] This PR is marked as draft with an explanation if not meant to
land until a future stable release.
- [x] This PR doesn’t contain automatically generated corrections
(Grammarly or similar).
- [x] This PR follows the [Google Developer Documentation Style
Guidelines](https://developers.google.com/style) — for example, it
doesn’t use _i.e._ or _e.g._, and it avoids _I_ and _we_ (first person).
- [x] This PR uses [semantic line
breaks](https://github.com/dart-lang/site-shared/blob/main/doc/writing-for-dart-and-flutter-websites.md#semantic-line-breaks)
of 80 characters or fewer.

---------

Co-authored-by: Shams Zakhour (ignore Sfshaza) <[email protected]>
@chinmaygarde
Copy link
Member

Is this stale? The linked issue that was marked as a dependency was completed.

@gaaclarke
Copy link
Member Author

Is this stale? The linked issue that was marked as a dependency was completed.

Sorta, the team has decided they don't want to land it until #170167 is completed. But that work has been postponed. I can drop this as a draft or put the diff in the linked issue.

@chinmaygarde
Copy link
Member

You can just close it. Since it its referenced from that issue, we'll still have a record of it on GitHub.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
engine flutter/engine repository. See also e: labels. platform-ios iOS applications specifically team-ios Owned by iOS platform team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add runtime warning for users of LaunchEngine
4 participants