Friday, 21 June 2019

How to configure deep-linking in iOS with Firebase Dynamic Links?

I'm trying to configure Firebase Dynamic Links into my iOS project and I'm having trouble interpreting the documentation here and how it needs to be adapted to my specific scenario.

In particular, when creating a deep link manually, I don't know what I should put instead of your_deep_link in the following example:

https://your_subdomain.page.link/?link=your_deep_link&apn=package_name[&amv=minimum_version][&afl=fallback_link]

They say it should be http or https, so I used a generic https website URL for the marketing page of my app. But then in XCode, in this doc there they say:

In the Info tab of your app's Xcode project, create a new URL type to be used for Dynamic Links. Set the Identifier field to a unique value and the URL scheme field to be your bundle identifier, which is the default URL scheme used by Dynamic Links.

So nowhere do I specify that my app should be open instead of the marketing website when loading on a device where the app is already installed. And I think that's why when I try to open this link in my iPhone's browser, it just loads the page there in the browser:

https://debugapproofreferences.page.link/?link=https%3A%2F%2Fapproof.derbigum.com%2Freferences%2Fleads%2F5b98ca7a-18f7-4ffa-8dbe-aed51b94f18b&apn=com.derbigum.approofreferences&ibi=com.derbigum.ApproofReferences&isi=1321450315

Note that I have 3 variants of the same app depending on the environment (Debug, Beta, Prod), so associated domain is set to applinks:$(DEEP_LINKS_DOMAIN), and DEEP_LINKS_DOMAIN is a user-defined setting depending on the environment, and for the Debug environment I'm working on right now, DEEP_LINKS_DOMAIN=debugapproofreferences.page.link.

Obviously I'm missing something here, and it's the first time I ever try to configure deep links so I'm a little lost.



from How to configure deep-linking in iOS with Firebase Dynamic Links?

No comments:

Post a Comment