Firebase dynamic link always open App Store instead of the application
Asked Answered
G

2

8

Was trying to setup deep-linking with Firebase Dynamic Link but the link always direct the user back to App Store even though the app has been installed.

I have tried the "Link Preview (Debug)" to test my Dynamic Link. Clicking the "App with deep link" and "Use Custom Scheme" launch the application properly, and routed the user to the correct page within the app. So I would assumed that my AASA and application are setup properly.

I have verified many times on the iOS bundle ID, App Store ID and Team ID configured within Firebase. All of them are populated properly, but still the link will always direct me to the App Store. Anyone can advise what else might caused this problem?

enter image description here

If I proceed to change the link to "Open the deep link URL in a browser" or "Custom URL", it would open the link properly in my iOS app. However, when the user do not have the app installed, it would throw error because the link is not a valid URL from my web server.

enter image description here

EDITED: Did additional testing here by selecting "Custom URL" when the app is not available, and it works(!) by opening the dynamic link to the application. However, if i delete the application from my phone, it will not redirect me to the custom link. It would continue opening the deep link in my phone and ended up with web server error as it's not a valid link. Screenshot from "Link Preview (Debug)" where it changed the "App Store" to "Web Link".

It's not able to detect my phone has the application installed for the first scenario, and it's not able to detect the application has been uninstalled in my phone for the second scenario..

enter image description here

Gardel answered 1/8, 2021 at 14:1 Comment(3)
Are you follow this document? rnfirebase.io/dynamic-links/usageExplicative
Are you add associate domain and enable onto apple developer console?Explicative
Yes, followed the guide to setup everything. Associate domain enabled too from apple developer.Gardel
M
2

Just cross check your Associated domains is correct or not , it should not contains http OR https.

Malinda answered 21/9, 2021 at 8:12 Comment(5)
thanks, and yes it's without any http/https. it's in this format "applinks:app.domain.com"Gardel
@YenSheng , Is it working now ?Malinda
nope, it's still not working..Gardel
bold guard let link = URL(string: "Write your link here and parameters") else { return } let dynamicLinksDomainURIPrefix = "racematesios.page.link" //domain-link let linkBuilder = DynamicLinkComponents(link: link, domainURIPrefix: dynamicLinksDomainURIPrefix ) linkBuilder!.iOSParameters = DynamicLinkIOSParameters(bundleID: "Bundle ID") linkBuilder!.iOSParameters?.appStoreID = "App store ID" guard let longDynamicLink = linkBuilder?.url else { return } print("The long URL is: (longDynamicLink)") Please try once to create link by ios frameworkMalinda
and please add below code on appdelegate class ,this will show error on log if anything wrong with dyanmic link configuration FirebaseOptions.defaultOptions()?.deepLinkURLScheme = Bundle.main.bundleIdentifier DynamicLinks.performDiagnostics(completion: nil)Malinda
G
0

Does your custom links and universal links is registered with dynamic link too?

Graupel answered 4/8, 2021 at 5:25 Comment(6)
Do you mind to elaborate more on this? I am using links.domain.com for Firebase dynamic link, and app.domain.com for my deep link. Do i need to register app.domain.com with Firebase? If so, how to i do it? ThanksGardel
Just to add on, links.domain.com is defined as URL prefix in Firebase and it's properly setup with "appAssociation": "AUTO" and "dynamicLinks": true. app.domain.com is hosted in another location with proper setup for AASA, which i believe is working fine since the link works without parsing through dynamic link.Gardel
You don't need to register your app.domain.com. But i think custom scheme and universal links might be the problem. Just yesteday, i implemented Dynamic link without those two, and it works fine.Graupel
Do you mind explaining how to implement Dynamic Link without custom scheme and universal links? My custom scheme and universal links actually works without passing through Dynamic Links. It doesn't work when passing through Dynamic Links, as it's not able to detect whether the app is installed.Gardel
How do you constructing the dynamic link? manually or using the console? If you're using the console, providing the deep link url is enoughGraupel
But that would defect the purpose of dynamic link wouldn't it? Because it would not redirect to App Store/Google Play when the app is not installed, similar to use the deep link directly which is working from my case.Gardel

© 2022 - 2024 — McMap. All rights reserved.