【问题标题】:Apple-app-site-association : banner displays while no file in serverApple-app-site-association :在服务器中没有文件时显示横幅
【发布时间】:2017-11-22 05:11:34
【问题描述】:

我的服务器根目录中有 apple-app-site-association 文件,因此在我的 iOS Safari 浏览器上显示横幅,但是当我从服务器删除文件时,清除了浏览器历史记录,然后也重置了我的手机,但仍然获取横幅。

注意:在文件中更改了我的应用 ID,但未反映在横幅中。

https://example.com/apple-app-site-association

apple-app-site-association 文件:

{
    "applinks": {
        "apps": [],
        "details": [
            {
                "appID": "123456789.com.abc.example",
                "paths": [ "*" ]
            }
        ]
    }
}

【问题讨论】:

  • 尝试在浏览器中点击example.com/apple-app-site-association,如果页面加载意味着您​​的服务器缓存仍在返回文件,请尝试清除服务器缓存或重新启动服务器
  • @SandeepBhandari - 是的,清除了我的 tmp 和垃圾文件夹,现在发现 example.com/apple-app-site-association 的文件未找到异常,然后清除了移动数据,但仍然出现横幅。
  • 我不知道你是如何实现服务器代码的,如果你有一些指向 example.com/apple-app-site-association 的路由正确更新它以返回 404。但不管它,您的横幅显示问题现在应该已经停止了
  • @SandeepBhandari - 更新了我的苹果文件。我仍然没有接触任何服务器代码,只是将文件放在根目录中。

标签: ios mobile-safari ios10 apple-app-site-associate


【解决方案1】:

您仍然获得横幅是因为您还没有再次构建应用程序。 在 ios 应用程序的构建过程中,它会从关联域下载 apple-app-association-file 并将其保存在应用程序中以进行深度链接。

一旦您获得带有更新后的 apple-app-association-file 的新版本 你的问题会得到解决的。

要从所有页面中删除横幅,您可以尝试以下代码:

{
"applinks": {
    "apps": [],
    "details": [
        {
            "appID": "your app id here",
            "paths": [
                "NOT /*"        
            ]
        }
    ]
} }

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2017-07-11
    • 2020-08-28
    • 2021-06-29
    • 1970-01-01
    • 1970-01-01
    • 2016-01-06
    • 2016-03-13
    • 1970-01-01
    相关资源
    最近更新 更多