- 
                Notifications
    You must be signed in to change notification settings 
- Fork 6k
Handle iOS Universal Links #25705
Handle iOS Universal Links #25705
Conversation
| It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact Hixie on the #hackers channel in Chat. 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. | 
17c1773    to
    96c58ac      
    Compare
  
    | @gaaclarke, @jmagman is everything fine in this PR? | 
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.
@gaaclarke may have more comments, he has more familiarly with this behavior #22356
| } else if (userActivity.activityType == NSUserActivityTypeBrowsingWeb) { | ||
| return NO; | ||
| } else { | ||
| NSURLComponents* components = [NSURLComponents componentsWithURL:userActivity.webpageURL | 
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 get the query and path off the userActivity.webpageURL URL if it's nonnull instead of creating a NSURLComponents?
| continueUserActivity:userActivity | ||
| restorationHandler:^(NSArray<id<UIUserActivityRestoring>>* __nullable restorableObjects){ | ||
| }]; | ||
| XCTAssertTrue(result); | 
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.
Maybe I'm missing something but shouldn't this be false since it falls into the else if (userActivity.activityType == NSUserActivityTypeBrowsingWeb) statement?
| OCMVerify([navigationChannel invokeMethod:@"pushRoute" arguments:@"/custom/route?query=test"]); | ||
| } | ||
|  | ||
| - (void)skip_testLaunchUniversalLink { | 
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.
Thanks for the unit test 😄
| Closing this as stale for now. Please re-open once progress can be made. Thanks. | 
iOS universal links were not handled by the engine. With this PR, the
FlutterAppDelegatesends the link path to the navigation channel methodpushRoute(similarly to Android App/Deep link or iOS Custom scheme link)Issues fixed: Android AppLinks is working but not iOS Universal Links
Pre-launch Checklist
writing and running engine tests.
///).If you need help, consider asking for advice on the #hackers-new channel on Discord.