通用Link。无与伦比的性格

Universal Link. Unmatchable character

我在尝试为通用 Link 文件 (apple-app-site-association) 匹配 '#' 字符时遇到问题。

对于像 domain/#/results/parameters 这样的 URL 我一直在尝试:

但是 none 对我有用。

恼人的一点是前两个几乎相等的匹配 URL domain/a/results/parameters (用什么字符代替#)

如何匹配#?

此致

“#”字符通常用于网址中以指定页面片段。如文档所述,在评估通用链接的路径时忽略片段:

"Other components, such as the query string or fragment identifier, are ignored."

https://developer.apple.com/library/content/documentation/General/Conceptual/AppSearch/UniversalLinks.html

@salazar,Apple 终于听到了我们的询问。现在你可以指定从 iOS 13

组件形式的片段

apple-app-site-association结构改成这样,

 "applinks": {
   "details": [
     {
    "appIDs": [ "TeamID.com.example.myapp"],
    "components": [
          {
            "/": "/path/#mypath/*",
            "#": "*fragment"
          }
        ]
      }
    ]
  }
}

您可以在此处找到有关通用链接的更多信息 - https://developer.apple.com/videos/play/wwdc2019/717/

注意 - 在撰写此答案时文档尚未更新。