Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
515 views
in Technique[技术] by (71.8m points)

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

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?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Aaron from Branch.io here

You are probably getting this error because Branch is attempting to launch your app via URI schemes when the app is not installed. Starting from iOS 9.2, Apple no longer officially supports URI schemes for deep linking, and developers are strongly advised to implement Universal Links in order to get equivalent functionality on iOS.

Specifically, there are significant drawbacks to custom URI schemes, most notably the inability to easily handle these two situations:

  • When the app isn’t installed.
  • When more than one app tries to claim myapp://.

For this reason, we recommend you enable Universal links in your Branch Dashboard. All you need to do is provide your bundle ID and app prefix, and Branch will host the AASA file for you.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...