从App Store安装后,Firebase动态链接不起作用

时间:2018-07-05 07:19:01

标签: ios firebase firebase-dynamic-links

我有以下情况:

  1. 对于已删除的应用程序,单击Firebase动态URL。应用商店已打开
  2. 从App Store安装此应用程序。

此处的预期结果是处理此链接的操作,例如转到给定的View Controller,但什么也没有发生。

在iOS上受支持,因为这种情况在Android上适用吗?

这是我的代码:

func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]? = nil) -> Bool {

    if let activityDictionary = launchOptions?[.userActivityDictionary] as? [String : AnyObject],
        let userActivity = activityDictionary["UIApplicationLaunchOptionsUserActivityKey"] as? NSUserActivity {
        return handleDynamicLink(userActivity: userActivity)
    }

    return true
}

func application(_ application: UIApplication, continue userActivity: NSUserActivity,
                 restorationHandler: @escaping ([Any]?) -> Void) -> Bool {
    return handleDynamicLink(userActivity: userActivity)
}


private func handleDynamicLink(userActivity: NSUserActivity) -> Bool{
    // Handling here ... 
    return true
}

这是看起来不错的诊断报告:

---- Firebase Dynamic Links diagnostic output start ----
Firebase Dynamic Links framework version 2.3.2
System information: OS iOS, OS version 11.2.1, model iPhone
Current date 2018-07-05 07:16:14 +0000
Device locale en-GB (raw en_GB), timezone Europe/Sofia
    Specified custom URL scheme is com.app and Info.plist contains such scheme in CFBundleURLTypes key.
    AppID Prefix: 123, Team ID: 123, AppId Prefix equal to Team ID: YES
performDiagnostic completed successfully! No errors found.
---- Firebase Dynamic Links diagnostic output end ----

0 个答案:

没有答案