Open iOS application from universal links - ios

I have implemented universal links in my application by uploading "apple-app-site-association" to my server and enabling "associated domains" in my project(by adding applinks). My app opens whenever I click on my server weblink from Safari browser.
1) Its not working on any other browser
2) I need to open my app from other apps as well, i.e. Instagram, Twitter etc.
How can I achieve the above scenarios using universal links. If not, is there any other way of achieving the same.

Not all apps will open universal links in you app. You can read a little more here:
"Pasting a Universal Link directly into the Safari URL field doesn’t cause the app to open automatically. If you do this, you will have to manually pull the website down so that a prompt will appear at the top asking you to open the respective app.
But, if you paste links in Facebook(app), Twitter(app), Mail(app) or even if you go to Facebook on Safari and then click on a universal link, the app opens directly.
Universal links will not works for all the apps in iOS. If you click on a universal link from any of the “BLACK LISTED” apps, it will not open the app. Go to this link to know more.
As in step one, for the first time you will have to manually pull down the website and click “open” to open the link using the respective app. The iOS will “remember” to open the app instead of opening the safari if the universal link with the registered domains are clicked."
https://medium.com/#abhimuralidharan/universal-links-in-ios-79c4ee038272
https://docs.branch.io/pages/deep-linking/universal-links/#appsbrowsers-that-support-universal-links

Related

How to force to open app by Universal Link in Swift likes iOS Notes app

I run into an issue with Universal Link that once the Universal Link is opened by Safari, it won't able to open by its app.
Seem iOS does remember the last app used to open the link.
But when I copy the link into iOS Notes app, long-press, select Open in "App Name" and the issue is gone! (Check the screenshot)
Does anybody know how to force to open an app like iOS Notes app?
Or does anybody know how to check whether the URL has been remembered to open by Safari by iOS?
I did try by open(_:options:completionHandler:) & specific options [.universalLinksOnly: true] but it doesn't work
Thanks all 🙏🏿
This article may help.
When a user browses your website in Safari and taps a universal link in the same domain, the system opens that link in Safari, respecting the user’s most likely intent to continue within the browser. If the user taps a universal link in a different domain, the system opens the link in your app.

How to not remember app selection using universal links

I am using universal links to open an app. In the apple-app-site-association file I have 2 apps credentials saved to be opened with this universal link. I have both apps installed in my device. When I tap the link, a system dialog appears asking me which of the 2 apps I want to open. All is working fine. But the problem is that after selecting to open in one app, the system remembers my selection and don't ask anymore. Is it possible to don't remember that selection? Or to remove it?

iOS 9+ Universal Links don't work from Google apps

The company I work for told me to ask the following:
When a universal link is tapped in other apps (native Apple apps, Slack, etc.) our app is opened, but if the same link is tapped in any Google app (Hangouts, Inbox, etc.) the universal link is not opened directly by our app.
We set the Google app to not open links inside it and we don't have Chrome installed on devices where the app was tested.
Does anyone have the same problem? Is there any solution for this?
Unfortunately this is the expected behavior. Universal Links do not work directly from within most Google apps — you need to have the link open a web page containing a button or other link within. That button or link can be a Universal Link, which then opens the app.
Here is more information about where Universal Links currently work and do not work.

Paste universal link in iOS 9 safari, but app does not open automatically

If I paste a universal link in safari in iOS 9, it still requires user to manually pull down to see the panel/banner, and then click the “Open App” in order to launch the app. Is this the normal behavior for safari in iOS 9?
But, if I paste links in Facebook(app), Twitter(app), Mail(app) ... all directly open the app. Even if I go to Facebook on Safari and then click on a universal link, the app opens directly.
Only if I paste a universal link directly in to safari search bar, the app does not open directly. It requires the user to click the “Open App” banner.
Is there any way to make Safari auto-launch the app?
This is actually expected behavior: for better or worse, pasting a Universal Link directly into the Safari URL field doesn't cause the app to open.
This page has a list of apps that are known to support Universal Links, and under which conditions.

iOS 9 Universal Links not launching the app from the same domain

I have setup my AASA JSON file to open the app when someone visits myDomain.com/ShowInTheApp/*
This works from Notes App, Email, Gmail App, Gmail web on safari and basically any other websites other myDomain.com .
When myDomain.com/chooseAppORweb.html contains a link to myDomain.com/ShowInTheApp/ , safari always opens it in the same tab, app wont get launched. I can tap and hold the link to show the context menu that contains an entry "Open In [My app name]" which will indeed launch my app. But not by single tapping on the link.
When I do the exact same steps from another domain, NOTmyDomain.com/chooseAppORweb.html always launches the app without issues.
Has anyone succeeded in launching the app consistently from the same domain using UL ?
Also, if there is an Apple's document that explains any of these behaviours, please share the link.
I'm not sure when Apple added this to their documentation, but it's explained on their Support Universal Links page, in the first note:
In iOS 9 and later, universal links let users open your app when they tap links to your website within WKWebView and UIWebView views and Safari pages, in addition to links that result in a call to openURL:, such as those that occur in Mail, Messages, and other apps.
When a user is browsing your website in Safari and they tap a universal link to a URL in the same domain as the current webpage, iOS respects the user’s most likely intent and opens the link in Safari. If the user taps a universal link to a URL in a different domain, iOS opens the link in your app.
For users who are running versions of iOS earlier than 9.0, tapping a universal link to your website opens the link in Safari.
(Emphasis added)
Essentially, once a user reaches a page hosted on your domain in Safari, any links they follow on your domain will be opened in Safari, even if they're defined as Universal Links by your app.
As st.derrick mentioned above, this is the in-place behavior for Universal links. If you have previously been taken to the App from the link, but then choose to be taken to the website when prompted with a long press, the functionality to open the App will break. You can remedy this by long-pressing again and choosing to open in-app. It's not an ideal solution, but it is the only way I've seen it be fixed. I hope this helps!

Resources