小编onC*_*ion的帖子

Apple-app-site-association 不起作用

我已经实现apple-app-site-association了与我的 iOS 应用程序的深度链接。
我创建了没有扩展名的 .JSON 文件并放置在我网站的根目录中。
现在,我可以在任何浏览器上看到该文件为https://example.com/apple-app-site-association

以下是 apple-app-site-association 文件中的 json 正文 -

{
    "applinks": {
        "apps": [],
        "details": [
            {
                "appID": "AppID.bundleIdentifier",
                "paths": [ "*"]
            }
        ]
    }
}
Run Code Online (Sandbox Code Playgroud)

仅供参考,我在我的网站(angular.js).htaccess 中添加了以下内容 -

<FilesMatch "^apple-app-site-association$"> ForceType application/json </FilesMatch>
Run Code Online (Sandbox Code Playgroud)

我已经在 Xcode 和 developer.apple.com 中启用了“关联域”。
但是,当我尝试安装新版本时,它不起作用。
通过深入研究设备日志,我收到以下错误。

请看看并帮助我了解我做错了什么。

[SWC] ### 错误的 apple-app-site-association JSON:错误域=NSCocoaErrorDomain 代码=3840“JSON 文本未以数组或对象开头,并且没有设置允许片段的选项。” UserInfo={NSDebugDescription=JSON 文本没有以数组或对象开头,并且没有设置允许片段的选项。}

swift ios9 ios-universal-links

6
推荐指数
4
解决办法
1万
查看次数

标签 统计

ios-universal-links ×1

ios9 ×1

swift ×1