"Safari无法打开页面,因为地址无效"在未安装应用程序的情况下访问“分支"链接时出现 [英] "Safari cannot open the page because the address is invalid" appearing when accessing Branch link with app uninstalled

查看:670
本文介绍了"Safari无法打开页面,因为地址无效"在未安装应用程序的情况下访问“分支"链接时出现的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在将应用程序与Branch.io集成在一起,并在Safari中遇到问题(我已经在iOS 11上对此进行了测试,但是该问题也可能在其他版本上出现.)

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).

基本上,如果我安装了我的应用程序并在Safari或Chrome中打开了快速链接,则一切正常,并且会提示我打开应用程序中的链接.但是,如果我卸载应用并点击Safari中的链接,则会收到以下消息:

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:

当我点击确定"按钮时,会提示您打开Appstore,这是所需的行为.有什么方法可以防止出现由于地址无效,Safari无法打开页面"消息?我尝试在未安装应用的情况下在Chrome中打开链接,并且在那里一切正常.

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.

我已经使用了官方的设置指南并输入了URI方案,但是由于我自己处理这些链接而禁用了通用链接.这可能是造成问题的原因吗?

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?

推荐答案

来自 Branch.io 此处的亚伦

您可能会收到此错误,因为在未安装应用程序时,Branch尝试通过URI方案启动您的应用程序.从iOS 9.2开始,Apple不再正式支持用于深层链接的URI方案,强烈建议开发人员实现通用链接,以在iOS上获得等效的功能.

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.

具体来说,自定义URI方案存在重大缺陷,最明显的是无法轻松处理以下两种情况:

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

  • 未安装该应用程序时.
  • 当多个应用尝试声明myapp://时.

因此,我们建议您在分支仪表板中启用通用链接.您需要做的就是提供您的捆绑包ID和应用程序前缀,Branch将为您托管AASA文件.

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.

这篇关于"Safari无法打开页面,因为地址无效"在未安装应用程序的情况下访问“分支"链接时出现的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆