gpt4 book ai didi

iOS 9 Universal Links 不从同一个域启动应用程序

转载 作者:可可西里 更新时间:2023-11-01 03:55:45 24 4
gpt4 key购买 nike

我已将我的 AASA JSON 文件设置为在有人访问 myDomain.com/ShowInTheApp/* 时打开应用程序

这适用于 Notes 应用程序、电子邮件、Gmail 应用程序、Safari 上的 Gmail 网页版以及 myDomain.com 之外的任何其他网站。

myDomain.com/chooseAppORweb.html 包含指向 myDomain.com/ShowInTheApp/ 的链接时,safari 总是在同一选项卡中打开它,应用程序不会启动。我可以点击并按住链接以显示包含条目“在 [我的应用程序名称] 中打开”的上下文菜单,这确实会启动我的应用程序。但不是通过单击链接。

当我从另一个域执行完全相同的步骤时,NOTmyDomain.com/chooseAppORweb.html 始终可以顺利启动应用程序。

有没有人成功地使用 UL 从同一域一致地启动应用程序?

此外,如果有 Apple 文档解释这些行为,请分享链接。

最佳答案

我不确定 Apple 何时将此添加到他们的文档中,但在他们的 Support Universal Links 上对此进行了解释页,在第一个注释中:

In iOS 9 and later, universal links let users open your app when they tap links to your website within WKWebView and UIWebView views and Safari pages, in addition to links that result in a call to openURL:, such as those that occur in Mail, Messages, and other apps.

When a user is browsing your website in Safari and they tap a universal link to a URL in the same domain as the current webpage, iOS respects the user’s most likely intent and opens the link in Safari. If the user taps a universal link to a URL in a different domain, iOS opens the link in your app.

For users who are running versions of iOS earlier than 9.0, tapping a universal link to your website opens the link in Safari.

(强调)

基本上,一旦用户在 Safari 中访问了您域中托管的页面,他们在您域中点击的任何链接都将在 Safari 中打开,即使它们被您的应用定义为通用链接也是如此。

关于iOS 9 Universal Links 不从同一个域启动应用程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33554973/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com