Skip to content

Commit 705a2da

Browse files
committed
Universal Links 对于不能处理的 url,使用 web 展示
1 parent 06a3d7e commit 705a2da

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

Coding_iOS/AppDelegate.m

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -201,11 +201,11 @@ - (void)applicationWillTerminate:(UIApplication *)application
201201

202202
- (BOOL)application:(UIApplication *)application continueUserActivity:(NSUserActivity *)userActivity restorationHandler:(void(^)(NSArray * __nullable restorableObjects))restorationHandler{
203203
if ([userActivity.activityType isEqualToString:NSUserActivityTypeBrowsingWeb]) {
204-
UIViewController *vc = [BaseViewController analyseVCFromLinkStr:userActivity.webpageURL.absoluteString];
205-
if (vc) {
206-
[BaseViewController presentVC:vc];
207-
}
208-
// [BaseViewController presentLinkStr:userActivity.webpageURL.absoluteString];
204+
// UIViewController *vc = [BaseViewController analyseVCFromLinkStr:userActivity.webpageURL.absoluteString];
205+
// if (vc) {
206+
// [BaseViewController presentVC:vc];
207+
// }
208+
[BaseViewController presentLinkStr:userActivity.webpageURL.absoluteString];//支持的链接就 native 打开,不支持的就用 web 打开
209209
}else{
210210
[[UIApplication sharedApplication] openURL:userActivity.webpageURL];
211211
}

0 commit comments

Comments
 (0)