Home > OS >  Firebase dynamic link always goes to ios app store even if app installed
Firebase dynamic link always goes to ios app store even if app installed

Time:05-04

I have a dynamic link that is working fine on Android however I can't get the App Store redirect behaviour working correctly on iOS.

If I set up the dynamic link to go to a url (not the app store) if the app is not installed it works as expected and opens the app. This is the dynamic link:

https://go.xxxxx.app/?link=https://member.xxxxx.app&apn=app.xxxxx.xxxxx&isi=1573527302&ibi=app.xxxxx.xxxxx&ifl=https://member.xxxxx.app&efr=1

However if I set it to go to the app store if the app is not installed it ALWAYS goes to the app store, even if the app is installed.

https://go.xxxxx.app/?link=https://member.xxxxx.app&apn=app.xxxxx.xxxxx&isi=1573527302&ibi=app.xxxxx.xxxxx&efr=1

I am obviously doing something wrong or misunderstand the relationship between deep links and dynamic links. "go" is my dynamic link subdomain and "member" is my deep link subdomain.

I realise there are several other questions on this but none of the answers helped me.

Other info

I am using a physical iPhone 8 with iOS 15.4.1

This is my deeplink which works fine if I click the url on my device: https://member.xxxxx.app

I have an app association file set up here: https://member.xxxxx.app/.well-known/apple-app-site-association I also set it here as I wasn't sure whether to set it up for the dynamic link as well: https://go.xxxxx.app/.well-known/apple-app-site-association

I have the following Associated Domain set up in Xcode: applinks:member.xxxxx.app Note that I have not added the associated domain applinks:go.xxxxx.app as this just seemed to make the dynamic link be treated like a deeplink.

I have the capability associated domains turned on in my Apple Developer identifier.

My app is published to the app store but not the latest version of the app with the associated domain member.xxxxx.app.

I have added my app and team id to Firebase on the ios app.

I have "Associated Domains Development" turned on in the developer settings of my iPhone.

I added FirebaseDynamicLinksCustomDomains in my info.plist as mentioned here: https://firebase.google.com/docs/dynamic-links/custom-domains#set_up_a_custom_domain_in_the

CodePudding user response:

It appears I needed to add applinks:go.xxxxx.app to the Associated domains as well. I can't test from the App Store if the link parameter works I guess I will have to wait until I release to the store.

So the dynamic link is also a deep link that contains another deep link. Kind of confusing. If anyone can add some more info or explanation that would be great.

I will leave the question here for now as it may help people.

I have the following Associated Domain set up in Xcode: applinks:member.xxxxx.app Note that I have not added the associated domain applinks:go.xxxxx.app as this just seemed to make the dynamic link be treated like a deeplink.

Edit: To get the dynamic link working in iOS see my answer here: Firebase short dynamic link not working in iOS (being treated as a deeplink)

  • Related