[英]iOS 9 and universal links on Safari from an iframe
I am trying to get a universal link to my iOS
app working on iOS 9
. 我试图让一个通用链接到我iOS
应用程序上工作iOS 9
。 The link should be displayed in an iframe. 该链接应显示在iframe中。
As of now I have got it working correctly for chrome on iOS 9
using: 到目前为止,我已经在iOS 9
使用以下工具正常运行:
<a href="https://demo.linkid.be/purpose?code=linkiddemo%3A%2F%2Fscan" target="_blank">Chrome iOS 9 all good</a>
This link does not work on Safari from an iframe tho. 此链接在iframe上不适用于Safari。 Through some experimenting I found that following link does work when called from my local ip: 通过一些实验,我发现当我从本地ip调用时,以下链接可以正常工作:
<a href="#" onclick="window.open('https://demo.linkid.be/purpose?code=linkiddemo%3A%2F%2Fscan')">Safari iOS 9 problem case</a>
But for some reason this will not open my iOS app when I add this link on a page hosted at the same domain as the universal link (demo.linkid.be) 但由于某些原因,当我在与通用链接相同的域上托管的页面上添加此链接时,这将无法打开我的iOS应用程序(demo.linkid.be)
Any thoughts? 有什么想法吗? Or is this a bug in Safari at this time? 或者这是Safari目前的一个错误?
[Update] [更新]
Safari iOS 9 with following link will work if you long press the link. 如果您长按链接,Safari iOS 9及以下链接将起作用。 An action sheet appears allowing you to open it via the app. 将出现一个操作表,允许您通过应用程序打开它。
<a href="https://demo.linkid.be/purpose?code=linkiddemo%3A%2F%2Fscan" target="_blank">Chrome iOS 9 all good</a>
In order to make a universal link inside of an iframe work in Safari on iOS9 you can use target="_top"
. 为了在iOS9上的Safari中在iframe内部创建通用链接,您可以使用target="_top"
。 The tradeoff is that the link will open in the same window. 权衡是链接将在同一窗口中打开。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.