Environment:
I have two apps (two targets in one xcode project), one is available in AppStore already, the second one is only on Testflight for testing. The Bundle Identifiers are camle case like Com.Company and Com.Company.Test and are set in the URL scheme field.
I did every step from the documentation:
https://firebase.google.com/docs/dynamic-links/ios/receive
My apple-app-site-association file looks like:
{
"applinks": {
"apps": [],
"details": [
{
"appID": "ABCD1234.Com.Company",
"paths": ["NOT /_/*", "/*"]
},
{
"appID": "ABCD1234.Com.Company.Text",
"paths": ["NOT /_/*", "/*"]
}
]
}
}
The Problem:
When ever I click the link (short link or full link) from Notes App, my app gets opened correctly but the method handleUniversalLink(_: completion:) returns nil for both error and dynamicLink completion handler parameters.
Thats my code:
override func application(_ application: UIApplication, continue userActivity: NSUserActivity,
restorationHandler: @escaping ([Any]?) -> Void) -> Bool {
if let incomingurl = userActivity.webpageURL {
let linkhandled = DynamicLinks.dynamicLinks().handleUniversalLink(incomingurl) { (dynamiclink, error) in
if let dynamiclink = dynamiclink, let _ = dynamiclink.url {
self.handleIncomingLink(dynamiclink);
} else {
Debug.log(DebugLevel.DebugLevelError, message: error?.localizedDescription, sender: self);
}
}
return linkhandled;
}
return false;
}
I tried everthing I found on Stackoverflow, GitHub ..but still no success.
Any hint? Tx
@ManuelRiegler did you find the solution for that problem?
@christsitsaris yes ..in my case FirebaseApp.configure() was just not called.
I use an internal framework and on "debug" builds Firebase was just disabled.
Firebase implementation unfortunately does not have a proper error message when its not configured correctly.
I really struggled with that, but I also don麓t know why I did not check before I submitted this bug report :)
@ManuelRiegler Man, you just saved me hours.
Most helpful comment
@ManuelRiegler Man, you just saved me hours.