iOS - 通用链接的Bug [英] iOS - Bug With Universal Links

查看:144
本文介绍了iOS - 通用链接的Bug的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在我的iOS应用中完全按照此处列出的步骤设置了Universal Links:

I have setup Universal Links in my iOS app exactly to details following the steps outlined here:

如何设置通用链接

使用Branch和Apple验证器成功验证100%。但是现在我正在尝试测试成品,我遇到了麻烦。

It validates 100% successfully using both Branch and Apple validators. But now that I'm trying to test out the finished product, I'm having trouble.

如果我输入或点击我网站的链接(例如,www .mydomain.com),Safari / Chrome / Facebook直接进入我的网站。

If I type in or tap a link to my site (ex, www.mydomain.com), Safari/Chrome/Facebook goes right to my website.

但是,如果我去Google,请输入www.mydomain.com作为搜索,找到指向我网站的链接并长按链接,在MyApp中打开是其中一个选项并且运行正常。

However, if I go to Google, type www.mydomain.com in as the search, locate the link to my site and long press on the link, 'Open in MyApp' is one of the options and works perfectly.

为什么会这样?我拔出我的头发了!

Why is this? I'm pulling out my hair!

推荐答案

不幸的是,Universal Links无处不在。从此页面

Universal Links unfortunately don't work everywhere. From this page:


  • 消息 |作品

  • 邮件 |作品

  • Whatsapp |作品

  • 松弛 |如果它设置为打开Safari,而不是应用内浏览器(使用SFSafariViewController)

  • Safari |有条件地工作

  • Chrome |有条件地工作

  • Google |有条件地工作

  • Gmail |如果安装了Chrome,则会在Chrome(不是Universal Link)中打开链接。否则,有条件地工作

  • 收件箱 |如果安装了Chrome,则会在Chrome(不是Universal Link)中打开链接。其他,有效。

  • Twitter |有条件地工作

  • Facebook |有条件地工作

  • FB Messenger |有条件地工作

  • 微信 |有条件地工作

  • Pinterest |不工作

  • 电报 |不工作(使用SFSafariViewController)

  • Messages | works
  • Mail | works
  • Whatsapp | works
  • Slack | works, if it's set to open Safari, not in-app browser (uses SFSafariViewController)
  • Safari | works conditionally
  • Chrome | works conditionally
  • Google | works conditionally
  • Gmail | if Chrome installed, opens link in Chrome (not Universal Link). Else, works conditionally
  • Inbox | if Chrome installed, opens link in Chrome (not Universal Link). Else, works.
  • Twitter | works conditionally
  • Facebook | works conditionally
  • FB Messenger | works conditionally
  • WeChat | works conditionally
  • Pinterest | not working
  • Telegram | not working (uses SFSafariViewController)

注意:有条件地工作意味着它可以工作(即,打开应用程序)一些时间:


  • 如果将链接粘贴到浏览器URL字段中,Universal Links将无效。

  • Universal Links使用用户驱动的< a href =...> 元素点击跨域。示例:如果google.com上有一个指向bnc.lt的通用链接,它将打开该应用。

  • 通用链接不适用于用户驱动的 < a href =...> 元素点击同一域。示例:如果google.com上的通用链接指向google.com上的其他通用链接,则无法打开该应用。

  • 无法通过Javascript触发通用链接(在 window.onload 或通过 .click()调用< a> 元素),除非它是用户操作的一部分。

  • Google,Gmail,收件箱,Twitter,Facebook,FB Messenger,微信 - 通用链接仅适用于你已经打开了一个webview。换句话说,它们不会在Feed / main视图中在应用程序中工作。同样,他们必须是跨域的,如果您的用户在yourapp.com上并且也为yourapp.com点击了Universal Link,它将无法工作。但是,从yourapp.com点击到bnc.lt将触发该链接作为通用链接并直接打开您的应用。

  • Universal Links will not work if you paste the link into the browser URL field.
  • Universal Links work with a user driven <a href="..."> element click across domains. Example: if there is a Universal Link on google.com pointing to bnc.lt, it will open the app.
  • Universal Links will not work with a user driven <a href="..."> element click on the same domain. Example: if there is a Universal Link on google.com pointing to a different Universal Link on google.com, it will not open the app.
  • Universal Links cannot be triggered via Javascript (in window.onload or via a .click() call on an <a> element), unless it is part of a user action.
  • Google, Gmail, Inbox, Twitter, Facebook, FB Messenger, WeChat -- Universal Links only work when you have a webview already open. In other words, they do not work in-app from the feed / main views. Again, they also must be cross-domain, aka if your user is on yourapp.com and clicks a Universal Link also for yourapp.com, it will not work. However, clicking from yourapp.com to bnc.lt will trigger the link to function as a Universal Link and open your app directly.

这篇关于iOS - 通用链接的Bug的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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