【问题标题】:How do I use the apple-app-site-association file with a component parameter exact match?如何使用与组件参数完全匹配的 apple-app-site-association 文件?
【发布时间】:2020-07-14 17:55:09
【问题描述】:

我正在尝试编写一个组件匹配,其中我只匹配 apple-app-site-association 文件中 URL 的 quesid=2109061920 参数。我希望所有这些过滤都在 apple-app-site-association 文件中完成,而不是在 swift 移动代码库中。

测试网址: https://example.org/MyChart/inside.asp?mode=questionnaire&from=list&src=sys&srcid=1&quesid=2109061920&empPIN=xxxxx%3D%3D&mobile=1

这有点工作,意味着它只过滤带有 quesid 的项目,但我可以在它后面放任何东西,比如 quesid=2109061920777...所以它不是完全匹配

{
  "applinks": {
    "apps": [],
    "details": [
      {
        "appIDs": [
          "***.com.***"
        ],
        "components": [
          {
            "?": {
              "quesid": "2109061920"
            },
            "comment": "testing"
          }
        ]
      }
    ]
  }
}

这也不起作用:

{
  "applinks": {
    "apps": [],
    "details": [
      {
        "appIDs": [
          "***.com.***"
        ],
        "components": [
          {
            "/": "/MyChart/*",
            "?": "quesid=2109061920",
            "comment": "testing"
          }
        ]
      }
    ]
  }
}

关于我缺少什么的任何想法?

【问题讨论】:

    标签: ios swift mobile


    【解决方案1】:

    您可以创建一个 json 文件来匹配精确的查询参数,如下所示:

    {
      "applinks": {
        "apps": [],
        "details": [
          {
            "appIDs": [
              "***.com.***"
            ],
            "components": [
              {
                "/": "/MyChart/*",
                "?": { "quesid": "2109061920" },
                "comment": "testing"
              }
            ]
          }
        ]
      }
    }
    

    【讨论】:

    • 非常感谢。我会试试这个语法。
    猜你喜欢
    • 2018-01-05
    • 2020-08-28
    • 1970-01-01
    • 1970-01-01
    • 2022-01-09
    • 2016-01-06
    • 2016-03-13
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多