Quickstart-ios: Firebase dynamic link always goes to app store URL even if the app is installed

Created on 30 May 2017  路  30Comments  路  Source: firebase/quickstart-ios

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.

Most helpful comment

3 years later i think this might be worth re-opening.

The whole idea behind dynamic links is to enable links that make the app behave a certain way. If this only works for users that do not have the app installed then this feature is only usable for an arbitrary number of users.

Marketing material and the concept of "sometimes works" don't go well together so i wonder how dynamic links are considered usable when they're not reliable. I must be missing out on something.

All 30 comments

Hi Ajay,

If you have your custom domain from Firebase e.g. [your custom domain].app.goo.gl, paste it into the Notes app like so:

https://[your custom code].app.goo.gl/

And then tap that link. Does it open the app, or does it go to Safari? If it goes to Safari, it means that you haven't configured your iOS app for universal links yet, which is needed to support opening your custom domain url directly in the app. In Xcode, go to the Capabilities tab, and ensure that you've added the universal link domain as described in Apple's docs.

I'm not sure whether @ajaybeniwal refers to this issue but here's how I can reproduce it. I have an app fully working and configured to accept dynamic links/custom scheme links. And it works as expected up until you do the following.
Though dynamic link opens in the application by default, one could override this behaviour. When the link is opened in app there's a tiny breadcrumb in the title bar:

fullsizerender

If user taps the top-right corner it will effectively override default behaviour and open all subsequent links for this app in Safari. In order to reset this behaviour one might do a Long Tap (or 3D Touch on compatible devices) on the link, reveal context menu, and explicitly select Open in <APP> option:

img_9375

Alternatively, an app smart banner can be used in iOS version of the website:

fullsizerender 2

After clicking on it dynamic link behaviour on iOS is reset to open links in the app.
Unfortunately, this behaviour is by design and it's not possible to disable it. The weird thing in this case is when dynamic link is opened in Safari the web page navigates user to the App Store even though the app has been already installed on the device:

img_9542

After tapping OPEN:

img_9543

After redirect to the App Store and tapping OPEN in it app is opened but it doesn't receive dynamic link obviously (since it happens only on the first launch after installation).

I have configured the universal link as suggested in documents but still most of the times dynamic link does not work

@ajaybeniwal So, it works for you sometimes? Is it possible that you ran into the iOS behaviour I described? Can you try Long Tap fix?

So there's probably two things happening here. First, as @x-cray said, if you tapped the site address on the far top-right on iOS, it _disables_ universal linking on that iOS app, until you long-tap and ask to open in the app again.

Second, you can't type in universal links into Safari's address bar and navigate to the app. Safari, by design, will open that URL in the browser. The easiest, most reliable way to test whether universal links are working is to put a universal link into the Notes app, and tap the link from there.

@rsattar Is it possible to configure Firebase Dynamic link somehow to still open the app instead of the App Store on the last step of the flow I described?

I had got the same problems too. I had review the documents and video again and again but nothing help. But one thing is strange. When i click https://[your custom code].app.goo.gl/ from notes app and got the 400 error. But click a dynamic link and got the page shown open app store . Any suggestion ? thanks.

@x-cray Currently, no. The link doesn't distinguish between clients since it has no way of knowing what apps the client may have installed.

The _best_ solution to this behavior is to implement a web component of your application, then implementing a smart app banner so users can view the content in your web app and then open (or install) the app if they so desire. Dynamic Links exists because not all developers have the resources to create web components to accompany their mobile products, but shouldn't miss out on low-friction promotional methods like deep links. Ultimately, we don't have a good solution for this case where the user has your app installed but opts to open the link in the web if there is no web content to show.

For me it works if I use the release product scheme "Product > Scheme > Edit Scheme > Build Configuration (Release)" and uncheck "Debug executable", unfortunately it never works in debug mode, not sure why. (I tested it in iOS 13)

I got the same issue. Tested on different devices with iOS 12 and iOS 13. On iOS 12 it works perfectly, but on iOS 13 it always goes to the App Store.

It's definitely has to be fixed, I've wasted a whole working day trying to make it work properly. Plus, there is not a single word in documentation about adding the App ID to the target's URL types鈥攊t's mentioned only in the tutorial on YouTube.

I have the same issue with deep links sent by email. They work on iOS 11-12, do not work on iOS 13. Everything is set up accordingly to documentation.

Having the same issue on ios 13

Same problem here. All day searching. I've tested all possible solutions. Nothing for iOS 13 (i'm on 13.5)

@pcaruso Have added associated domains capability for debug as well as release in Xcode???

Hi @emvigotech , yes, domain is configured in both debug and release. Can鈥檛 make the link open the app when I clicked on it. It is redirecting me to the preview webpage. After that it takes me to the AppStore (though Im in development and the app is still not there). When I launch my app again, the dynamic link is nil. My continue method inside SceneDelegate is not called. Im on iPhone XS, iOS 13.5

Same issue here

Also having the same issue

Also same issue here with iOS 13.5 version always go to the appstore but im not sure if the dynamic link persist in case to open safari, appstore, and then open app ?
But with iOS 13.3 works i dont know if 13.4 or 13.5 creates de bug

Also, the same issue here with iOS 13.5 version always goes to the AppStore.
But with iOS 13.3 works I don't know if 13.4 or 13.5 creates the bug.

After countless days of not finding a solution and trying everything, I decided to restore my phone from scratch going to settings -> General -> Restore -> All data. Links are working fine now and they are opening the app executing my continue method (after the app is installed). Hope it helps someone.

After countless days of not finding a solution and trying everything, I decided to restore my phone from scratch going to settings -> General -> Restore -> All data. Links are working fine now and they are opening the app executing my continue method (after the app is installed). Hope it helps someone.

Hey, Can you please add screenshots? This problem still persists.

Having the same issue

Same issue, watched this video (timestamped) https://youtu.be/KLBjAg6HvG0?t=533

And he describes what I believe to be the issue, and indeed his proposed fix of: deleting the app, restarting the phone, and reinstalling the app works.

This isn't reproducible 100% of the time, only some of our internal testers go to the App Store, the rest get the App launched as expected

According to the video, iOS sometimes "fails to download the apple site association",
if you go to your Dynamic Link: https://MYAPPNAME.page.link/apple-app-site-association, you should see the appID there. It would make sense if iOS fails to download that, that it would launch the app store?

I'm not sure though if the issue in that video is the same that we are experiencing here. If it is we may be out of luck? the associated radar is still open

3 years later i think this might be worth re-opening.

The whole idea behind dynamic links is to enable links that make the app behave a certain way. If this only works for users that do not have the app installed then this feature is only usable for an arbitrary number of users.

Marketing material and the concept of "sometimes works" don't go well together so i wonder how dynamic links are considered usable when they're not reliable. I must be missing out on something.

i had the similar issue. I fixed it by deleting application from device. And adding in Xcode, Target, Info, URL Types "Bundle ID" as in video https://youtu.be/KLBjAg6HvG0?t=533.

I also have same issue, any solution ? 馃槙馃槙馃槙

I also have the same issue here...

I also have the same issue here...

i couldn't believe it, but it worked i had everything perfect but still not working so i wipe my data from the phone and it worked hhh, the problem is when the app lunch for first time don't pass the params from the link, instead it trigger the deeplink ! anyone have similaire issue ?

Was this page helpful?
0 / 5 - 0 ratings