"Safari cannot open the page because the address is invalid" appearing when accessing Branch link with app uninstalled

Grzegorz Aperliński picture Grzegorz Aperliński · Nov 23, 2017 · Viewed 13.8k times · Source

I'm integrating an app with Branch.io and encountered an issue in Safari (I've tested this on iOS 11, but the issue might be appearing on other versions as well).

Basically, if I have my app installed and open a quick link in either Safari or Chrome, everything works fine and I get a prompt to open the link in the app. However, if I uninstall the app and tap on the link in Safari I get the following message:

error message on Safar

When I tap the OK button, I get a prompt to open the Appstore which is the desired behaviour. Is there any way to prevent the "Safari cannot open the page because the address is invalid" message from appearing? I've tried opening the link in Chrome without the app installed and everything works fine there.

I've used the official setup guide and entered my URI Scheme but disabled Universal Links because I'm handling those myself. Could this be causing the issue?

Answer

Gary Kerr picture Gary Kerr · Mar 13, 2018

I too was having this problem but I found that following the instructions in the Test section of the Branch Test App I was able to open the app without the Safari warning.

https://github.com/BranchMetrics/ios-branch-deep-linking/tree/master/Branch-TestBed-Swift#test

1. If the app was installed on the test device already:
    * Delete the app from the device
    * Clear Safari web content, history and cookies (Settings > Safari > Clear History and Website Data)
    * Reset the device's IDFA (Settings > Privacy > Advertising > Reset Advertising Identifier...)
2. Create a Marketing link from the Branch dashboard
3. Paste the link into Notes on an iPhone
4. Tap the link - you will get redirected to the web page
5. ...