-
Notifications
You must be signed in to change notification settings - Fork 28.7k
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
base: master
Are you sure you want to change the base?
Conversation
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. |
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 |
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."); |
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.
Prefer [FlutterLogger logWarning:@"..."] for embedder code. That is guaranteed to be shunted through the appropriate logging endpoint.
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.