10
votes

I am trying to integrate Firebase dynamic link into IOS app but the problem is that even if the app is installed the dynamic link is taking me to app store page to download the App from app store. Did anybody face the same problem and have solution for the same.

4
Same here, I'm also looking for a solution.Denis Parchenko
Can you confirm universal links are set up correctly in your app? So you have the domain association set up in the app for the [appcode].goo.gl domain, and you've got your team ID set up in the Firebase console? If you'd rather not share details publicly, please contact our support team: firebase.google.com/support/contact/troubleshootingIan Barber
Same here... If I set forcedRedirectEnabled = true (efr=1) it always redirects to the app store even though app is installed. If I set it to false it's working fine.Shah Paneri
@DenisParchenko : Did you find any solution regarding this issue?Shah Paneri

4 Answers

2
votes

Edited the link through firebase console. With the 'Skip the app preview page' enabled and 'Use a custom scheme when universal links aren't supported' disabled I was always redirected to the app store.

The solution for me was to enable both universal links and a custom scheme.

Can't say why, but maybe it will help someone.

1
votes

TL;DR: To make it work, you must also set up the Firebase Dynamic Link as a universal link in your app settings. To do so, see below.

My dynamic link worked with the preview page, but then I added "&efr=1" to skip the preview page and redirect directly to either the App Store or my app. It worked with the preview page because it called the universal link that was already set up with the app.

Example: My app is named Spontit. Preview page worked because the "Open" button redirected to spontit.com, which is linked to my app. But the dynamic link is spontit.page.link - a different domain name - and therefore, if you skip the preview page, it opens spontit.page.link and not spontit.com in Safari and so not my app, and subsequently redirected to the App Store always.

You must set up the custom dynamic link (e.g. spontit.page.link) as a universal link. Follow these steps to do so.

enter image description here

Source: https://firebase.google.com/docs/dynamic-links/ios/receive

1
votes

After spending my whole one day, I am able to figure it out finally. It is working if your app is live, just set App ID & TeamID in Firebase App settings.

Issue comes up when app is not live and we are setting another App ID. Just add following line, it will work like a charm:

FirebaseApp.configure()
FirebaseOptions.defaultOptions()?.deepLinkURLScheme = Bundle.main.bundleIdentifier

Setting deepLinkURLScheme with your bundle id.

0
votes

I faced the exact same problem. To work around this, I give up href attribute and use onclick on <a/>

<a onclick="location.href=https://somedynamiclink.url">Dynamic Link</a>

Please note, no href attribute on a tag.