Firebase 动态链接问题

Issue with Firebase dynamic links

我们正在尝试使用动态 links 进行深度 linking。 link 表现正常。

但是,在点击时,它没有点击应用中的 userActivity restorationHandler 方法。

我们已经按照文档中提到的所有步骤进行操作,诊断输出如下

---- Firebase Dynamic Links diagnostic output start 

version 12.1.1,  model iPhone Current date 2018-12-13 05:08:44 +0000 Device locale en-IN (raw en_IN), timezone Asia/Kolkata    Specified custom URL scheme is dev.XXX.xxx and Info.plist contains such scheme in CFBundleURLTypes key.    AppID Prefix: XXXX, Team ID: XXXX, AppId Prefix equal to Team ID: YES performDiagnostic completed successfully! No errors found.

---- Firebase Dynamic Links diagnostic output end -------- 
Firebase Dynamic Links framework version 3.3.0 System information: OS
iOS, OS

动态 link 控制台中有关于应用程序 ID 前缀的警告。

iOS app ‘com.xxx.ios’ lacks App ID Prefix. UniversalLinks is not enabled for the app.

我们已经交叉检查了我们的团队 ID,似乎没问题。

有人可以帮我们解决这个问题吗?

我遇到了同样的问题。 所以,我问了 Firebase 团队,得到了答案并解决了问题。 这是解决方案。

Looks like you’ve encountered an issue while debugging your Firebase Dynamic Link. Just to share, when adding an iOS app to a Firebase project, an OAuth client ID is automatically generated for it in it’s associated Cloud project. Deleting the app doesn't remove its corresponding client IDs, which can cause issues for the dynamic link. Here are the steps to change or delete the package name/bundle ID for the client IDs:

  1. Access the project on the Cloud console
  2. Go to APIs and Services > Credentials
  3. Identify the client ID with the conflicting package name/bundle ID in the name (ex: [Android/iOS] client for (auto created by Google Service)
  4. Edit the package name/bundle ID and save changes or delete the OAuth client ID