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

Open
wants to merge 1 commit into
base: master
Choose a base branch
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

@@ -22,6 +22,9 @@ - (instancetype)init {

- (FlutterEngine*)engine {
if (!_didTakeEngine && !_engine) {
NSLog(@"Using FlutterAppDelegate as a FlutterPluginRegistry is deprecated.\n"
@"Use `FlutterAppDelegate.pluginRegistrant` and `FlutterPluginRegistrant` instead.\n"
@"See https://docs.flutter.dev/release/breaking-changes/uiscenedelegate.");
Copy link
Member

@cbracken cbracken Jun 6, 2025

Choose a reason for hiding this comment

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

Prefer [FlutterLogger logWarning:@"..."] for embedder code. That is guaranteed to be shunted through the appropriate logging endpoint.

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
3 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy