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 Answers
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.
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.
Source: https://firebase.google.com/docs/dynamic-links/ios/receive
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.
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