IOS 9 Universal Links does not launch an application from the same domain

I installed the AASA JSON file to open the application when someone visits myDomain.com/ShowInTheApp/*

This works with Notes applications, email, Gmail, Safari's Gmail website and basically any other sites on myDomain.com other.

When myDomain.com/chooseAppORweb.html contains a link to myDomain.com/ShowInTheApp/ , safari always opens it on the same tab, the application does not start. I can press and hold the link to display a context menu containing the entry β€œOpen In [My app name]”, which will really launch my application. But not with one click on the link.

When I do the same action from another domain, NOTmyDomain.com/chooseAppORweb.html always launches the application without problems.

Has anyone successfully launched an application from the same domain using UL?

In addition, if there is an Apple document explaining any of these actions, please share the link.

+6
source share
2 answers

I'm not sure when Apple added this to its documentation, but it explained on the Support Universal Links page in the first note:

In iOS 9 and later, universal links allow users to open your application when they click links to your site within WKWebView and UIWebView views and Safari pages, in addition to the links that cause openURL: to be openURL: for example, those that occur in Mail, Messages and other applications.

When a user views your site in Safari, and they click on a universal link to a URL in the same domain as the current web page, iOS respects the most likely users and opens the link in Safari. If a user removes a universal link to a URL in another domain, iOS opens the link in your application.

For users who run versions of iOS earlier than 9.0, clicking the universal link to your site opens the link in Safari.

(emphasis added)

In fact, as soon as a user reaches a page hosted in your domain in Safari, any links that they follow in your domain will be opened in Safari, even if they are defined as universal links by your application.

+4
source

As st.derrick mentioned above, this behavior is in place for universal references. If you were previously delivered to the application from this link, but then choose to be sent to the website when a long-press request appears, the function that opens the application will break. You can fix this by clicking again and again to open the application. This is not an ideal solution, but it is the only way I have seen fixing it. Hope this helps!

0
source

All Articles