Problem on Universal link with mail app and gmail app - ios

I've configured a universal via branch.io.
My link seems to be working when presented as https://example.com in a mail or gmail.
However, this doesn't look good and people don't tend to click on plain old links. We're using hypertext reference tags and Button tags to make it bit friendly.
It looks something like this:
Go to App
Problem now we've is that this Go to App link/button doesn't work in native mail or gmail app. Instead of taking us to our app, mail app tries to open this link <a href> in safari. It then takes us to our app's App Store page.
Peculiar thing is If I open gmail in safari to start with and open the link from there then safari seems to understand that this is universal link and it segues into my app.
In summary:
1.Safari can open any link including hypertext reference or button tag
2.Both Mail and gmail app don't support hypertext reference nor button tag but plain old link https://example.com is fine in both the app
Has anybody gone through similar situation ? Appreciate any sort of help.

There are a lot of limitation when you hyperlink a universal link. I would recommend you to use Branch Universal email which allows you a seamless email to app integration. Please see:
https://branch.io/universal-email/
https://docs.branch.io/emails/universal-email
In case you still have any other doubt, reach out to support#branch.io

Related

Universal link after installing app wont open from Safari

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.

Branch link is not opening installed application while clicking on link shared to Skype

I have shared a branch link to Skype.But when I click on the link, it redirects to the App Store rather than opening my installed application.I have the link working for email,twitter etc ..
Alex from Branch.io here: unfortunately this is the expected behavior.
Skype is one of the apps that uses SafariViewController so this is an iOS limitation from Apple. Links in Skype can't open other apps via Universal Links directly from the chat feed, and this is not an issue specific to Branch.
However, Branch does have a workaround available: our deepviews feature sends users to a web landing page with an 'open in app' button. This does work, and is currently the best option available until Apple updates the Universal Links implementation to work properly with SafariViewController.

Universal Links opened in unsupported apps, are they completely lost?

I am trying to implement Branch marketing links in my app. I want for example to be able to create a link to share with users that will route them to a particular screen in the app. I noticed from the Branch docs that for some apps the link just opens the app store and not the actual app (even if it is installed). Being based in Asia I have the feeling that most of our customers will be wanting to share the link via an unsupported app such as Line. If a user is redirected to the app store via the link and then taps “open app”, what happens? Is the link meta data lost? Does the meta data only remain if the link is opened in an app such as mail or notes?
Alex from Branch.io here:
This list in the Branch documentation gives a partial list of apps that support Universal Links, but unfortunately it is not complete. We've tried to cover the most common apps.
Line is using a custom webview (not SFSafariViewController). It doesn't support Universal Links for the initial click, but this is one of the edge cases where Branch can detect the originating app and do some custom behavior. For Line, we trigger your app's URI scheme. This means the behavior your users see when clicking a Branch link from within Line is the same as Universal Links, even though Universal Links isn't actually the protocol being used.
If you want to handle other apps where Branch doesn't have a workaround like this, you could try enabling the deepviews feature. This will cause the link to open a content preview with a button to launch the app (or forward to the App Store if not installed).
When a user with the app already installed clicks the Open button on the App Store page, all the meta data is preserved and they will still be deep linked. Branch doesn't know (or care!) what happens between when the user clicks the link and the app launches, so that gives you plenty of flexibility.
Universal Links have some restrictions - not from Branch but from Apple's implementation. One of these restrictions is Universal Links cannot be opened from SFSafariViewController.
From Branch's docs, Line is not explicitly mentioned but other popular messaging apps may be of interest. I don't have Line myself but whether Line launches websites in it's own browser or the Safari app may give you a clue.
Facebook Messenger - works conditionally
WeChat - works conditionally
Twitter - works conditionally
LinkedIn - works conditionally
Any app using SFSafariViewController - works conditionally

iOS Universal Link App Store redirect

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.

iOS URL schemes and emails

So asking this because I have not found a version of this in one place that describes the outcome, or I don't know what to search for.
Here is the question. I have a app that I wrote and incorporated a URL scheme, let's say it's named ABC, so the url scheme would be:
ABC:/this/is/the/data
So, I want to send out a email to folks that would open my app, so the link is pretty straight forward. But, what if I want them to goto the website in the case they don't have my app, way www.abc.com/this/is/the/data. Is there a way to code my email so that both are possible? (That if the app is present it opens, if not the site opens?)
Thanks in advance!
In an email there is not a way to do it. My approach would be to send them to your website and in your website page have the iOS smart banner for your app. This will give them the option to open the app or download the application.
<meta name="apple-itunes-app" content="app-id=myAppStoreID, affiliate-data=myAffiliateData, app-argument=myURL">
The other approach would be to include 2 links in your email and explain that if you have the app to click the specific link. If not then click the website link.

Resources