延迟深度链接无法在 iOS 10 上运行

Deferred Deeplink not working on iOS 10

您好,我在 iOS 10 上遇到延迟深层链接的问题。这很奇怪,因为它只发生在 iOS 10 及更高版本上。在 iOS 9 和 8 上它工作正常。 当我从 APP ADS Helper 发送延迟深层链接时,我在 iOS 10 中的以下方法中得到的结果是“成功”,而不是我需要处理的 url,它在 iOS8和9.

[deferredAppLinkRequest startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection,
                                                      id result,
                                                      NSError *error)];  

文档中说:“从 iOS 10 开始,iOS 不支持延迟深度链接,因此一旦人们安装,您将无法打开除开始屏幕以外的内容应用程序。 ”

我该怎么办? ios 10 不再支持延迟深度链接了吗,我应该处理它链接正常的深度链接吗? (BOOL)application:(UIApplication *)application 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 可以处理? 有什么想法吗?

Beginning with iOS 10, iOS doesn’t support deferred deep linking, so you can’t open content other than the starting screen once people have installed the app

这可能是正确的,如果您依赖 Facebook 进行延迟深度 link 处理。这绝不是一个好主意,因为 Facebook 的延迟深度 link 功能不好(委婉地说)。

幸运的是还有其他选择。我建议查看 Facebook ads functionality from Branch.io(全面披露:我在 Branch 团队)。