pstued
pstued

Reputation: 381

iOS path exclusion in universal link is not working

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.

For example:

These URL's are handled as expected:

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.

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?

Upvotes: 6

Views: 982

Answers (1)

Casey
Casey

Reputation: 6701

i think the problem is that your URL matches both cases, which is then making the results unpredictable.

try making the paths mutually exclusive. if thats not possible you may need to change the URL structure.

UPDATE:

it's possible that your NOT string is ill formatted, try changing it to: "NOT /webapp/issue/*/ads/*/*.html"

Upvotes: 0

Related Questions