密码自动填充:我可以将 apple-app-site-association 文件放在别处而不是根目录或 .well-known

Password-Autofill: Can I place apple-app-site-association file elsewhere instead of root directory or .well-known

我正在为我的 iOS 应用程序添加密码自动填充功能。当我要求其他处理后端的开发人员将 apple-app-site-association 文件放在 Web 服务器的根目录中时,他告诉我无法从根目录 url 访问该文件,因为应用于项目的路由。相反,他说你可以使用以下 Url.

https://sv2.example.com/src/assets/apple-app-site-association

sv2.example.com 是我的根目录。现在我能做什么。苹果有什么办法可以通过上面的方式访问它url?screenshot of associated domain capability in Xcode

{
    "webcredentials": {
        "apps": [
            "TeamID.BundleId1",
            "TeamID.BundleId2",
            "TeamID.BundleId3"
        ]
    }
}

这是我的 apple-app-site-association 文件的内容。 任何帮助,将不胜感激。谢谢。

编辑: 为此,我正在使用苹果的密码自动填充框架。

出于安全原因,它必须位于根目录或 .well-known,这意味着您可以控制该域。

如果你能以某种方式指定自定义路径,我可以将文件上传到 Github,例如,然后告诉 Apple 在我的自定义 URL 上找到关联文件并声明域。

您的后端开发人员必须以某种方式实现它,也许建议使用 .well-known 文件夹替代方案。