I implemented Universal Links. The apple-app-site-association is structured as follows:
我实现了通用的链接。苹果应用程序-站点关联的结构如下:
{
"applinks": {
"apps": [],
"details": [
{
"appID": "APPID.my.awesome.newspaper",
"paths": [ "NOT /webapp/issue/*/ads/*", "/webapp/issue/*/*.html" ]
}
]
}
}
For some reason the first path with the NOT is not considered at all.
由于某种原因,第一个带有NOT的路径根本不被考虑。
For example:
例如:
These URL's are handled as expected:
这些URL按预期处理:
awesome-newspaper.my/webapp/issue/sz/2016-01-22/page_2.157908/article_1.2828646/article.html
awesome-newspaper.my/webapp/issue/sz/2016-01-22/page_2.157908/page.html
This URL should not be handled as Universal Link and should always open in Safari.
这个URL不应该作为通用链接来处理,应该始终在Safari中打开。
awesome-newspaper.my/webapp/issue/sz/2016-01-22/ads/ad_145/index.html
But it always opens in the App as well.
但它也总是在应用中打开。
Can someone please help me out?
谁能帮我一下吗?
1 个解决方案
#1
0
i think the problem is that your URL matches both cases, which is then making the results unpredictable.
我认为问题在于您的URL与这两种情况都匹配,这使得结果不可预测。
try making the paths mutually exclusive. if thats not possible you may need to change the URL structure.
尝试使路径互斥。如果不可能,您可能需要更改URL结构。
UPDATE:
更新:
it's possible that your NOT string is ill formatted, try changing it to: "NOT /webapp/issue/*/ads/*/*.html"
有可能您的非字符串格式不正确,请尝试将其更改为:“NOT /webapp/issue/*/ads/* .html”
#1
0
i think the problem is that your URL matches both cases, which is then making the results unpredictable.
我认为问题在于您的URL与这两种情况都匹配,这使得结果不可预测。
try making the paths mutually exclusive. if thats not possible you may need to change the URL structure.
尝试使路径互斥。如果不可能,您可能需要更改URL结构。
UPDATE:
更新:
it's possible that your NOT string is ill formatted, try changing it to: "NOT /webapp/issue/*/ads/*/*.html"
有可能您的非字符串格式不正确,请尝试将其更改为:“NOT /webapp/issue/*/ads/* .html”