iOS Universal Links and URL Shorteners

自作多情 提交于 2020-01-20 06:03:04

问题


We have recently begin to encounter issues with our Universal Link implementation when the UL is accessed via a shortened goo.gl URL.

This Works: https://site.domain.com/Deep/Link

This does not: https://goo .gl/fake -> 302 Redirect -> https://site.domain.com/Deep/Link

Is anyone else experiencing the same thing?

Note: I had to break up the shortened Google URL to keep StackOverflow's editor from yelling at me.


回答1:


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.

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.



来源:https://stackoverflow.com/questions/36225871/ios-universal-links-and-url-shorteners

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!