Universal link are familiar http links that iOS apps can now use to open apps, rather than opening the link in Safari web browser.
If the app is installed, then the universal should work just fine.
One pitfall is when the user disassociate the link; as if telling iOS that the link should NOT open the app.
We will explain how that happens and the solution.
Opening a Universal Link
We use Uber app as an example.
let url = "https://m.uber.com/"
UIApplication.sharedApplication().openURL(url)
The above will open Uber app.
The Pitfall
The pitfall is when the user tap on the top right uber.com.
Tapping on that will tell iOS that you, the user, do NOT want Uber app to be opened for the link.
To be specific, it only affects the app that opened it. Other apps will still open fine. The reason is for user to disable certain apps.
The solution
When the universal link doesn’t work, it will open Safari instead.
In the webpage, you have to pull down to reveal the smart banner that will give you the option to re-open Uber app.
Tap on OPEN, and iOS will re-associate the universal link to work for your app.