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

Yen Sheng
  • 695
  • 1
  • 12
  • 28

2 Answers2

2

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

  • thanks, and yes it's without any http/https. it's in this format ```"applinks:app.domain.com"``` – Yen Sheng Sep 21 '21 at 10:09
  • @YenSheng , Is it working now ? – user2732084 Sep 24 '21 at 18:33
  • 2
    nope, it's still not working.. – Yen Sheng Sep 26 '21 at 07:23
  • **bold** guard let link = URL(string: "Write your link here and parameters") else { return } let dynamicLinksDomainURIPrefix = "https://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 framework – user2732084 Sep 27 '21 at 11:18
  • 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) – user2732084 Sep 27 '21 at 11:18
0

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

Jimly Asshiddiqy
  • 335
  • 4
  • 15
  • 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? Thanks – Yen Sheng Aug 04 '21 at 10:37
  • 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. – Yen Sheng Aug 04 '21 at 13:41
  • 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. – Jimly Asshiddiqy Aug 05 '21 at 04:06
  • 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. – Yen Sheng Aug 05 '21 at 14:09
  • How do you constructing the dynamic link? manually or using the console? If you're using the console, providing the deep link url is enough – Jimly Asshiddiqy Aug 06 '21 at 04:03
  • 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. – Yen Sheng Aug 06 '21 at 06:23