14

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.

AL.
  • 36,815
  • 10
  • 142
  • 281
Ajay Beniwal
  • 18,857
  • 9
  • 81
  • 99
  • Same here, I'm also looking for a solution. – Denis Parchenko Jun 13 '17 at 08:26
  • 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: https://firebase.google.com/support/contact/troubleshooting/ – Ian Barber Jun 23 '17 at 15:50
  • 1
    https://github.com/firebase/quickstart-ios/issues/282 – Pekka Dec 02 '17 at 12:41
  • 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 May 15 '18 at 12:04
  • @DenisParchenko : Did you find any solution regarding this issue? – Shah Paneri May 16 '18 at 05:18
  • Nope. In fact, check almost any Google app — they all work this way :) – Denis Parchenko May 17 '18 at 12:31
  • In ios, when i open from safari the url format is changed in firebase.getInitialUrl() method.Works fine for both android and ios while opening from chrome – Johncy Jun 11 '19 at 11:24
  • @ShahPaneri Please see my answer. – Joshua Wolff Dec 14 '19 at 00:47

4 Answers4

2

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.

Iris Veriris
  • 448
  • 5
  • 7
2

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.

Pratik Patel
  • 1,393
  • 12
  • 18
1

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

Joshua Wolff
  • 2,687
  • 1
  • 25
  • 42
0

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.

e-zuka
  • 121
  • 1
  • 6