Universal links (Deep linking) not working on iPhone but works on iPad

I was able to fix this issue and this is one of the annoying issue that I have come across, because it doesn't say what is going wrong.

Fix: Whenever the iOS opens your link in safari, you need to pull down the webpage in safari and there you'll see a banner saying that, open it in the app. Once you click on that banner your future links will start opening the app instead of opening it in the safari browser.

There was no error whatsoever and there was no indication why the link was getting opened I am pretty sure that, iOS didn't download the apple-app-site-association whenever I installed the app.

Also note that the banner in the webpage will not be visible whenever your link opens up in safari, you need to pull down the webpage and then the banner will become visible and if you click on open in app banner, it will start opening the links in app.

If in future if you select to view the link in safari by clicking on context menu which appears on right hand side of the status bar, which will be saying "Open in [your app name]" in safari, the links in future will open in safari instead of app, and again if the banner open in app isn't visible, you have to pull down the webpage to see that banner.

HTH.


In iOS 13, similar problem of direct links not opening the app instead it open the safari website directly.

Fixed by updated the below safari setting... Settings > Safari > Request Desktop Website > All websites > Switch Off


I was facing the same issue in iOS 12, on one device the link redirected to my app and on another device it was always redirecting to Safari and pressing the link on the Notes app was only allowing me to open it on Safari.

What I believe happened was that I pasted the URL in the browser and clicked Go, as I thought it would redirect to my app. No matter what I did ( reinstalling the app, restarting the device, ... ) the results were always the same, redirecting to Safari. What helped me was deleting the cached data for my domain ( Settings -> Safari -> Advanced -> Website Data -> Swipe and delete the data for your domain ).

After that, everything started working.


I believe this is a bug with iOS Simulator,
In my case it was occurred when I entered an invalid address (with multiple spaces) for example:

Valid One: myApp://order/10003101
Invalid One: myApp://order/1003131

It stopped working even with Valid One and the solution was to clear Safari Website Data:

Go to Settings/Safari -> Clear History and Webstie Data

  • Device: iPhone 12 Pro Max
  • iOS: 14.5
  • Xcode: 12.5