当通过缩短的 goo.gl URL访问UL时,我们最近开始遇到我们的Universal Link实施问题。
We have recently begin to encounter issues with our Universal Link implementation when the UL is accessed via a shortened goo.gl URL.
此作品: site.domain/Deep/Link
这不是: https:// goo .gl / fake - > 302重定向 - > site.domain/Deep/Link
This does not: goo .gl/fake -> 302 Redirect -> site.domain/Deep/Link
还有其他人遇到同样的事情吗?
Is anyone else experiencing the same thing?
注意:我不得不拆掉缩短的Google网址,以防止StackOverflow的编辑对我大吼大叫。
Note: I had to break up the shortened Google URL to keep StackOverflow's editor from yelling at me.
推荐答案通用链接由正在访问的URL触发,如果重定向未由显式用户操作触发,则会被忽略。由于 goo.gl 未在您的应用中注册(并且由于您无法控制它而无法注册),因此将URL隐藏在缩短的链接后会绕过Universal Link检测对于目标域。
Universal Links are triggered by the URL that is being accessed, and are ignored if a redirect is not triggered by explicit user action. Since goo.gl isn't registered to your app (and cannot be, since you don't control it), burying your URL behind a shortened link is bypassing Universal Link detection for the destination domain.
goo.gl 上没有好的解决方法。最好的选择是在自定义域上设置URL缩短器,您可以在应用程序中注册Universal Links。或者, Branch.io (完全披露:我在分支团队中)或Firebase动态链接可以为您处理此问题,因为两者都基本上在他们代表您控制Universal Links的域上设置了自定义链接缩短器。
There is no good workaround for this on goo.gl. The best option is to set up a URL shortener on a custom domain that you CAN register with your app for Universal Links. Alternatively, Branch.io (full disclosure: I'm on the Branch team) or Firebase Dynamic Links could handle this for you, since both essentially set up a custom link shortener on a domain they control for Universal Links on your behalf.
更多推荐
iOS通用链接和URL缩短器
发布评论