I have setup firebase for receiving universal links and custom url schemes. I have 2 issues here,
Clicking links on the app like whatsapp opens the browser but not the
app, however, if I get the link to the notes app and open it, it
shows an option of "open in app" after doing this, everytime I open
it in whatsApp it seems to work fine.
When I try to open links via chrome from the email app, it redirects
to the app via custom url scheme, however the problem is that, the
next time I open the app, it tends to repeat the action. Although I
have already handled the custom url scheme previously, I dont know
why its trying to do it again, kinda freaks me away.
Related
Senario: User scans a QR code with a unique universal link into our app to "redeem" their code.
They scan the code which goes to a webpage with a link to download the app.
The user downloads the app.
Returns to the web page and there is a link within the page which is the same link as the QR code.
We assume tapping the (same) URL would trigger the universal link but it does not.
The universal link works fine from email or other apps (after its been installed)
How can we fix this bad UX, is there a HTML component or redirect we need to consider when tapping the basic link on the Web page. How can we make the link initiate the "deeplink" into the app now its installed. The banner at the top is displayed but its not the ideal flow.
The user cannot scan the QR code again - they must go through the download and "reopen" app in one flow.
Universal links do not trigger in Safari. This is intentional behavior confirmed by Apple engineers in the forums (sorry, don't have a link right now). Their reasoning: if you're already in the browser eco-system you usually do not want to be redirected to an app, but want to stay in the browser.
What you can do is have your app implement a custom URL scheme, and your web page can then check if your custom URL scheme is supported and open it.
When using Huawei App Links (Because Firebase dynamic link doesn't work for Huawei App Gallery), this is the kind of long link that is generated.
https://example.drcn.agconnect.link/?deeplink=https%3A%2F%2Fexample.com%2Freferral%2F3c3432x&android_deeplink=https%3A%2F%2Fexample.com%2Freferral%2F3c3432x&android_open_type=2&android_package_name=com.example.mobile
When clicked on this link on an Android(Google) device where my app is not installed, I see these options:
"Open" - opens the deep link i.e https://example.com/referral/3c3432x in a browser
"Download" - opens the Google play store app with my app page
The download behavior is fine, but I don't want the open behavior, since that link actually does not exist. I understand this link still be accessed on a desktop and might try to go to the link on a browser, but for now we are okay showing 404 in such cases.
Is there a way to avoid the "Open" option? Or better would be to stop showing this screen and immediately redirect to application if installed or play store of not installed. Just like how Firebase does.
I even tried the option of landing_page_type=2 as listed here: https://developer.huawei.com/consumer/en/doc/development/AppGallery-connect-Guides/agc-applinking-createlinks-defined-0000001055514692 but that doesn't seem to work, it always show the Open/Download page irrespective of the value.
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.
we are currently in the process of linking our web portal to our native app (iOS). In the first step, we will try to implement some Deeplinks.
Therefore it is planned to host the "apple app site association file" on the domain (e.g portal.example.com) and provide deeplinks with the help of Universal Links. However, before we start the implementation, there are some questions left:
Let's say we have only 3 URLs that should deeplink to the app. Each of them will get an own row in the paths section:
portal.example.com/functions/firstfunction
portal.example.com/functions/secondfunction
portal.example.com/functions/thirdfunction
If the User now opens the first URL, he will be asked if he wants to open it in the app, right? Let's pretend the user accepts and opens the URL in the app. What happens if he then goes back to the portal and tries to open the second URL? Will he be asked again, or will the app remember the decision and open any URL from the aasa file in the app?
What happens if we use wildcards and write the path like this:
"portal.example.com/functions/*"
Thank you and bg!
Let me first correct you:
If you use 'universal links', and you open any url, then it will not first ask you that "open in app" and then if denies then to webpage.
But it will be work in this manner:
You must be opening URL in iOS device's safari browser(it will not work for other browsers).
It will first open the webpage. If it finds 'apple-app-site-association' file on that website + It also finds the app with same path in its associated domains section installed on device. Then it will show top bar like below image:
Now, if use clicks on this OPEN button, then only your app is going to be opened. If you come back from app to website, this will remain as it is on top.
Answer to your second question: If you provide only specific domains, then the above popup will be visible only for specific webpages. If you are using wildcards, then all webpages which comes under that wild card, will have top bar like above image.
One more thing to note while you are developing above feature: Universal links get associated while you install the app OR update to new version. So, while developing app - let you have installed app without any associated domains, now you added associated domains in app, and installed app again(via xcode) on your device, and open the webpage in safari. Then above will not work. To make it work, either you have to remove/uninstall the app first and then install it again OR you have to change the version.
I have universal links working correctly, when the app is installed I see how the link opens the app, and when it's not installed opens the url in safari.
Actually what I would like to do is to redirect and go to the app store, so users can download the app directly.
Im going to include a redirect on the html file, because I know universal links don't support redirects a the http server config level (anyway I think this is for the manifest file only, apple-apps-site-association)
Anyone can confirm if this is the right way to do it, or the only way to do it? I don't like the idea to open safari first, load my html (with the redirect only) and then go to the store. Looks like there's no easier way to do it.
You're right: server-side redirects aren't allowed for the apple-app-site-association file. However, I believe once the user opens a Universal Link and (assuming the app is not installed) lands on the URL, all options are on the table (server-side, or otherwise).
If the page on the other end of your Universal Links URL contains an instant JS redirection to your app's App Store page, that should work just fine. Something like this:
window.location = 'itms-apps://itunes.apple.com/us/app/imdb-movies-tv/id342792525'
But yes, no matter how you do it, Safari is still going to open. It'll flash past so quickly that the user likely won't even notice. Here's a real-time recording I just made of the Branch.io deep linking service's demo app doing exactly this process:
From here: https://developer.apple.com/library/archive/documentation/General/Conceptual/AppSearch/UniversalLinks.html
"When you support universal links, iOS 9 users can tap a link to your website and get seamlessly redirected to your installed app without going through Safari. If your app isn’t installed, tapping a link to your website opens your website in Safari."
You're not doing it wrong, that's just how they work.