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.
Related
I am using Firebase Dynamic Links to handle deep linking into my ios app (from external links) and this works fine.
My issue is when I try to handle a dynamic link that has been launched from inside the app. In particular, I am using Firebase in-app messaging with a dynamic link as the action on the card button.
I have added the capabilities and URL scheme to Xcode. The documentation states that I use the Firebase app bundle as the URL scheme value. The only thing that isn't clear is whether this means the Firebase project id or the dynamic link domain which is the one set in the capabilities tab as the applinks: value.
When I tap on the button to launch the dynamic link it does recognise it as a dynamic link (because it doesn't just open my hosting domain in the browser), but it redirects to the browser first and asks me if I want to open the app (that I just came from).
Does anybody know how to configure this behaviour so the links don't ask you first? Would this then immediately handle the link in the app?
UPDATE
I was able to get the app to handle the dynamic link immediately in the app by skipping the preview page. You do this by manually constructing the link and setting the efr=1 parameter. This article explains it all: https://firebase.google.com/docs/dynamic-links/create-manually
BUT - although my app was handling the deep-link, it STILL redirected to the browser where it attempted to load the web.app domain from hosting.
I feel this could be something to do with the URL types setting in Xcode which if set properly should prevent it from trying to handle links in the browser.
UPDATE UPDATE
For some reason, this just stopped redirecting to the browser and I have no idea why. I watched a Firebase video and the guy did mention something about iOS being weird, and that Safari can break dynamic links and he recommended always testing them from the notes app. Weird. I wonder if something got pwned somewhere. I will write up an answer. 👍
Not entirely sure why, but this just started to behave. The dynamic link I am using in the in-app messaging campaign is the long-form URL with the efr=1 parameter to skip the preview page in the browser.
I want to know whether we can have multiple dynamic links to point to my react native ios app.
Say, I am using ab2ya.app.goo.gl/ already registered with my app, and I also have apple-site-association file setup aswell.
Now, for marketing purposes I would like to have another format of the dynamic link that looks more professional, like appname.page.link/.
But in xcode I can only setup one firebase url. How to use both the formats at the same time?
You can add multiple domain entitlements to your apps: https://developer.apple.com/documentation/security/password_autofill/setting_up_an_app_s_associated_domains
As long as both your app and the firebase console are aware of a domain, dynamic links should work!
I'm trying to implement Firebase Dynamic Links in an iOS app. The goal is to have a clean URL for marketing purposes so folks can share links on social media. The idea is folks will share the clean URL that starts with my domain name.
When the app is installed following a click on that link, we want to be able to track who referred the app install by looking at the payload delivered by Firebase. I think this goal is similar to Firebase's use case to convert web users to mobile app users.
An example link I would like to provide for sharing on social media is: http://example.com/my-payload-here
I've tried several cases but I'm not able to get the behavior I'm looking for in any case. Has anyone implemented this successfully before?
Here is my test procedure:
Uninstall the app
Send the link to be tested in an iMessage to myself
Tap the link on my iOS device (not using a simulator)
Install the app from the App Store
Launch the app after download completes by tapping "Open" button in the App Store
Below are my findings:
Short link generated from the Firebase Console (https://xyz.app.goo.gl/ABCD) - Link opens in App Store. I install the app. When I launch the app after installing, the payload is not delivered. If I quit out of the app, go back to the link in iMessage, and launch a second time, the payload is delivered.
Long link identical to the "Long Dynamic Link" from the Firebase console for the link generated in #1 (https://xyz.app.goo.gl/?link=http://example.com/my-payload-here&isi=12345&ibi=com.example.MyApp) - behavior is identical to #1
Short link using my domain (http://example.com/redirect/my-payload-here, configured to 301 redirect to URL in #2) - Opens in App Store. I install. When I launch the app after installing, the payload is not delivered. If I quit out of the app, go back to the link in iMessage, and launch a second time, the link still goes to the App Store.
Some questions I have:
Why isn't the payload delivered on the first launch for cases 1 and 2?
How can we make this launch the app and deliver the payload instead of going to the App Store?
I've also consulted the Firebase flowchart for the deep link in case 2.
Google Firebase team added support for custom subdomains to Dynamic Links.
You can now specify up to five custom page.link subdomains for your Dynamic Links. Short links using these new custom subdomains look like the following example: https://example.page.link/abcXYZ
Firebase Dynamic Link domains assigned on projects couldn't be deleted at this time.( firebase team is working on it.)
You can now whitelist the URL patterns that can be used as a Dynamic Link's deep link (link) or fallback link (ifl, ipfl, afl, ofl). If you define a whitelist, Dynamic Links won't redirect to URLs that don't match a whitelisted pattern.
You can try both of these features in the Firebase console.
This is not currently possible with Firebase. If you need whitelabeled URLs, you either need to build it yourself or use a more powerful link platform like Branch.io (full disclosure: I'm on the Branch team).
To answer your questions specifically:
I have implemented Firebase Dynamic Links in a testbed app and can confirm that linking through installation the first time does work for both long and short URL variants. There is likely something wrong with your AppDelegate config, so we can take a look at that if you want to share code.
Firebase does not support custom domains at this time. In theory (if you can solve the first issue above) you could get this working for first install by using a redirect like you have tried. However, you'll never be able to get it to launch the app with Firebase link data once the app is installed. This is because Universal Links work based on the domain of the link, and don't even request the web destination. Even if you enable Universal Links manually on your own domain, the app will open immediately without ever calling Firebase and the link data will never be set.
Would like to know if expected behavior on deep linking using branch.io so when clicked on should check for app availability and prompt customer on iOS device to
Prompts to download app in App Store if not installed
Open in iOS app seamlessly if installed
If customer declines app download it will open in iOS mobile browser
My concern is this deep link behavior on a desktop experience. When a user clicks the same url I am being told this will take them to the iTunes app store resulting in a poor experience. Is this a correct statement? Is there any way to provide a better experience to the end user.
Thanks in advance!
I am being told if the same url is opened in Windows10 it will take me to the App
For example
1. Users opens email with deeplink url
2. what is expected behavior on mobile device with app installed that deep link
For iOS redirects, you'll have to set yourself up for Universal Linking per the documentation here:
https://dev.branch.io/getting-started/universal-app-links/guide/ios/
This is very important for redirect behavior on iOS 9 and later. Please note that not all 3rd party apps and browsers support Universal Linking functionality yet, so you should test on iOS from iMessage or Notes initially.
As for Desktop, you can set your Desktop redirect on the Link settings page - this will not take users to the App store/Play store on Desktop, but to the page you set. You can use the Branch hosted text-me-the-app page if you want to have this as your default for Branch redirects, or your site homepage, or any other page of your choosing. You can add Deeplink data that will be used for all redirects by adding key/value pairs in the SDK or manually when creating a marketing link from the Branch Dashboard. You can also set a $deeplink_path value that will be honored for a specific link, and you can further set a $desktop_url that will override defaults if you want a different redirect for a specific link.
There are many options and ways for you to configure how your redirects work - all of this is up to how you set your Link Settings on the Dashboard, and if you choose to override these defaults for any particular link. For example, you might have default redirects to the App store set for iOS and a desktop URL set to your main webpage on Link Settings. In this case, a link created without modifying these values will take the user to the App store on iOS (or the App if installed), and to the desktop URL specified in Link settings if clicked from Desktop. If, however, you want to override and set $desktop_url as something else for a given link, say, to a specific page on your webpage using the $desktop_url key, on iOS the redirects will be the same but on desktop you will be taken to the set $desktop_url. For any of these scenarios you can specify Deeplink Data to be passed through.
Using my iPhone i noticed that when i open a youtube link like http://m.youtube.com/..., this is redirect to the native Youtube app.
I would like to do the same thing but using my custom url scheme, so i would like to have a custom url, if my app is installed in the device this is redirected in it, or if it's not installed, to do something else.
I've tried to register as a custom url scheme the "http://" url scheme, but the is not listening for these urls.
edit-
I've already tried to register my custom url scheme, i want to use an html page, in that page i want to put my custom url scheme, but the problem is that i can't detect, from the web page, if the app is installed in the device
Take a look to the Associated Domains.
If I understand well your question you need to define your own domain that will be associated to your app. Every time an app will find that specific domain the OS will check if any installed app can handle it.
You need to add the capabilities as specified by Apple here
Hope it helps
For that you need to create your custom URL Schema for that you can open via another app.
Following is the Tutorial where you can create your own URL Schema and use into your app.
Here is tutorial.
You can define custom url schemes that will open your app, but you can't make your app the designated handler for certain domain names so that opening that domain in Safari will launch your app automatically.
And One thing for more detail this solution given into this question also.
Happy coding.
You need to add your custom URL schemes in Info.plist. With this schema you can launch your app.