嗨我在iOS 10上有延迟深度链接的问题 . 它很奇怪,因为它只发生在iOS 10及更高版本上 . 在iOS 9和8上它工作正常 . 当我从APP ADS Helper发送延迟的深层链接时,我在iOS 10中的下面的metod中获得的结果是“成功”而不是我需要处理的url,这在iOS 8和9上被收回 .
[deferredAppLinkRequest startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection,
id result,
NSError *error)];
在文档中它说:“从iOS 10开始,iOS不支持延迟深层链接,因此一旦人们安装了应用程序,您就无法打开除起始屏幕之外的内容 . ”
我该怎么办 ? ios 10不再支持延迟的深层链接,我应该处理它(BOOL)应用程序中的linke普通深层链接:(UIApplication *)应用程序openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation?
这是我在didFinishLaunching中的代码
if (launchOptions[UIApplicationLaunchOptionsURLKey] == nil) {
[FBSDKAppLinkUtility fetchDeferredAppLink:^(NSURL *url, NSError *error) {
NSLog(@“LINK %@ ERRROR %@“,url, error);
if (error) {
NSLog(@“Received error while fetching deferred app link %@“, error);
}
if (url) {
// IM HANDLING IT HERE
if ([[url host] isEqualToString:@“deeplink”]) {
if ([[url path] isEqualToString:@“/smth”]) {
//my code }
}
}
以前使用此代码工作正常,突然停止在iOS 10上工作,我没有Url处理?有任何想法吗 ?
1 回答
这可能是真的, if you're relying on Facebook for deferred deep link handling. 这从来都不是一个好主意,因为Facebook推迟的深层链接功能并不好(说得客气一点) .
幸运的是还有其他选择 . 我建议从Branch.io查看Facebook ads functionality(完全披露:我在分支团队中) .