安装后Firebase动态链接不可用

时间:2018-03-26 06:08:16

标签: ios firebase firebase-dynamic-links dynamic-links

我已经实施了Firebase动态链接,并且通用链接正在按预期工作。对于自定义方案网址,我接到application:openURL:options:的来电,但该链接永远不可用。从笔记应用程序点击我的动态链接后,转到App Store并从Xcode启动我的应用程序我总是得到<my-scheme>://google/link/?dismiss=1&is_weak_match=1从我读过的内容中,这意味着Firebase成功连接到服务器但找不到待处理的链接。

DynamicLinks.performDiagnostics有此输出:

---- Firebase Dynamic Links diagnostic output start ----
Firebase Dynamic Links framework version 2.3.2
System information: OS iOS, OS version 11.2.6, model iPhone
Current date 2018-03-26 04:57:40 +0000
Device locale en-AU (raw en_AU), timezone Australia/Sydney
    Specified custom URL scheme is <my-scheme> and Info.plist contains such scheme in CFBundleURLTypes key.
    AppID Prefix: XXXXXXXXXX, Team ID: XXXXXXXXXX, AppId Prefix equal to Team ID: YES
performDiagnostic completed successfully! No errors found.
---- Firebase Dynamic Links diagnostic output end ----

配置:

  • Firebase 4.11.0
  • DynamicLinks 2.3.2
  • Xcode 9.2
  • 使用iOS 11.2.6在iPhone 7 Plus上进行测试。
  • 在WiFi和Cellular上测试

我已按照文档进行设置,并确保在FirebaseApp.configure()上调用了application:didFinishLaunchingWithOptions

关于我可能遗失的任何想法?

1 个答案:

答案 0 :(得分:0)

Firebase的动态链接有一个大问题,说明不是很明确,基于: https://firebase.google.com/docs/dynamic-links/custom-domains

并将其更新到您的ios项目:


// Info.plist
<dict>
  <key>FirebaseDynamicLinksCustomDomains</key>
  <array>
    <string>https://yourtargetlink.com</string>
    <string>https://yourfirebasedynamiclink.com/link</string>
  </array>
</dict>

这将适用于: https://yourfirebasedynamiclink.com/link/?link=${encodedLink}&apn=com.example&isi=1449448875&ibi=com.example encodedLink=https://yourtargetlink.com(您应该将其编码为此https%3A%2F%2Fyourtargetlink.com