通用链接不起作用

Universal links doesn't work

这是我的 apple-app-site-association 文件:

{
    "applinks": {
        "apps": [],
        "details": [
            {
                "paths": [
                    "*",
                    "\/doubanapp\/*",
                    "\/authorHome"
                ],
                "appID": "KV99XUUJ3U.com.moer.MoerFinance"
            }
        ]
    }
}

我已经设置了Xcode个关联域,这是我的截图:

我使用 https://search.developer.apple.com/appsearch-validation-tool/ 测试我的域,但出现错误:

Error no apps with domain entitlements The entitlement data used to verify deep link dual authentication is from the current released version of your app. This data may take 48 hours to update.

如果我的应用必须发布,那么等待 48 小时?

您的应用无需在 App Store 中上线即可使用通用链接。

但是,查看 https://moer.jiemian.com/apple-app-site-associationhttps://moer.cn/apple-app-site-association,它们都提供无效的 SSL 证书。 iOS 将拒绝这些,这会破坏通用链接。

我会在这里为 Branch.io 添加一个无耻的插件(完全披露:我在 Branch 团队),以防你只是在寻找简单的深层链接而不想处理这些设置细节。

对于自签名证书问题,您是否尝试将 ?mode=developer 添加到关联域的权利(例如 applinks:mydomain.com?mode=developer)中的 URL?

当您使用不受信任的证书时,这是域的格式:

<service>:<fully qualified domain>?mode=<alternate mode>

<alternate mode> 设置为 developer 就像我上面的例子

文档说:

developer

Specifies that only devices in developer mode can access the domain. In this mode, you can use any valid SSL certificate on your web server, including a certificate the system doesn’t trust. Make sure you don’t expose your users to security issues, such as man-in-the-middle attacks. As an added precaution, only apps signed with a development profile can use developer mode, and users must opt in on any device they use.

这是来自 Apple 的参考文档 - 滚动到页面底部:

https://developer.apple.com/documentation/bundleresources/entitlements/com_apple_developer_associated-domains