iOS通用链接和URL缩短器

编程入门 行业动态 更新时间:2024-10-17 00:30:29
本文介绍了iOS通用链接和URL缩短器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

当通过缩短的 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缩短器

本文发布于:2023-11-28 21:20:04,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1643979.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:链接   iOS   URL

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!