Upon clicking Firebase dynamic link - DynamicLinks.dynamicLinks().handleUniversalLink returns false

為{幸葍}努か 提交于 2020-08-09 05:48:10

问题


I am using Firebase dynamic links and I have few links that I have created in the firebase console.

Here is example short link that I copy pasted to an email and clicking: https://app.xxx.com/deeplink/xyz

When we click on the link provided, the following function gets called:

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

I have tried capturing the dynamic link with following code and it always returns false and completion block was never executed:

let handled = DynamicLinks.dynamicLinks().handleUniversalLink(userActivity.webpageURL!) { dynamiclink, error in
   print("dyn:: ------- \(dynamiclink?.url)")
}

I have tried referring to similar issues here, here are few links: 1. https://github.com/firebase/quickstart-ios/issues/380 2. Firebase dynamic linking - Continueuseractivity not returning dynamic link url

But none of them worked. And this is the error I could see in the logs: Deep Link Web URL query is empty

PS: I am using Firebase Dynamic Links version - 4.0.1


回答1:


I forgot to setup FirebaseDynamicLinksCustomDomains in Info.plist. Once that has been set, it started working



来源:https://stackoverflow.com/questions/57464004/upon-clicking-firebase-dynamic-link-dynamiclinks-dynamiclinks-handleuniversa

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!