gpt4 book ai didi

iOS 深度链接(通用链接)通过子域

转载 作者:塔克拉玛干 更新时间:2023-11-01 21:18:44 25 4
gpt4 key购买 nike

我已经阅读了很多关于通用链接的文章,但我仍然需要弄清楚一些事情。

我必须添加到 http://www.domain.com 的通用链接,但由于某些原因,我将无法使我的网站通过 SSL 认证,甚至无法将 apple-app-site -与根文件夹中的 https 关联。所以我想用不同的方式来做这件事,我将把 apple-app-site-association 文件放在子域的根目录中,比如说 https://www.app.domain .com/apple-app-site-association

然后,只要通用链接可用,我就会打开该子域的每个通用链接,并将 https://www.app.domain.com 重定向到 http://www.domain。 com 如果通用链接不可用。

Questions in my mind :-
  1. apple says - file needs to be accessible via HTTPS—without any redirects—at https:///apple-app-site-association. In this line what does apple mean by without any redirects ?

  2. when apple does not find any universal link related to a particular URL, will it itself redirects it to safari.

  3. Is this a safe way to add universal links or is it necessary to have our main domain on https or at-least apple-app-site-association on https

最佳答案

这应该可以正常工作。要明确回答您的问题:

  1. “无重定向”意味着当 iOS 请求 https://www.app.domain.com/apple-app-site-association 时,它必须在该地址找到文件。您不能有任何类型的重定向(Javascript、301、302 等)
  2. 如果 URL 对于通用链接无效,因为您没有使用 apple-app-site-association 文件中的包含规则覆盖它,它将使用 Safari 打开。如果 URL 位于另一个没有有效 apple-app-site-association 文件的域(例如,http://www.domain.com/),那么它将也可以在 Safari 中打开。
  3. 是的,很好。绝对是一种解决方法,但并非不安全。

您还应该调查托管的深度链接服务,例如 Branch.io (完全披露:我在 Branch 团队)或 Firebase 动态链接。这些将为您提供所有相同的好处(老实说,还有更多的灵 active ),而无需任何设置麻烦。

关于iOS 深度链接(通用链接)通过子域,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41115860/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com