-
Notifications
You must be signed in to change notification settings - Fork 6k
Reland deeplinking with info.plist check #22356
Reland deeplinking with info.plist check #22356
Conversation
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.
The logic looks good, just a concern about the naming
|
|
||
| @implementation FlutterAppDelegateTest | ||
|
|
||
| - (void)testLaunchUrl { |
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.
Just curious, where do we mock FlutterDeepLinkingEnabled in this test?
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.
I didn't, that's why it was failing. Fixed it.
|
|
||
| static BOOL IsDeepLinkingEnabled() { | ||
| NSDictionary* infoDict = [[NSBundle mainBundle] infoDictionary]; | ||
| NSNumber* isEnabled = [infoDict objectForKey:@"FlutterDeepLinkingEnabled"]; |
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.
The key name may be confusing. Developers can still do their own deeplinking if they write custom plugin. this is really for the default push route behavior.
@johnpryan any suggestion for the name?
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.
That's a lot to fit into a name, I think we'll have provide more context in our docs (either the API docs or on flutter.dev)
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.
@chunhtai sound good? We keep it like this and define it in our docs? I agree with john that it is impossible to convey all nuances in so few characters.
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.
yes that sounds good to me, I have updated the android part to match
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
Description
If you look at the first commit in the PR, it's just relanding #22337. The second commit turns it off by default unless you turn it on with the Info.plist.
Related Issues
flutter/flutter#66294 (comment)
Tests
I added the following tests:
Same tests we had for #22337
Checklist
Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes (
[x]). This will ensure a smooth and quick review process.Reviewer Checklist
Breaking Change
Did any tests fail when you ran them? Please read handling breaking changes.