1

Here is my actual apple-app-site-association file:

{
 "applinks": {
  "apps": [],
  "details": [ {
   "appID": "XXXXXXXXX.com.example.app",
   "paths": [
    "NOT /Registration",
    "/*"
   ]
  }]
 }
}

I would like to allow every urlendpoint to working as universal link, expect the example.com/Registration/whatever But the above code not working. If I click on a registration link, it open my application. I tried a lot of version of this file eg: "NOT /Registration/*", "NOT /Registration*", "NOT /Registration/", but no one work. What is wrong?

UPDATE: Here is my full example registration link: https://example.com/Registration/AccountActivation?activationCode=XXXX

just
  • 1,900
  • 4
  • 25
  • 46
  • Could we see the fully-formed /Registration link you're clicking? – Alex Bauer Mar 30 '16 at 07:49
  • @AlexBauer i updated my question – just Mar 30 '16 at 08:00
  • I believe `"NOT /Registration/*"` is the right one...not sure why it's behaving differently. What happens with https://example.com/Registration/ alone? – Alex Bauer Mar 30 '16 at 09:16
  • If the link is example.com/Registration ios open the link in Safari. I modified the content of the apple-app-site-association file to "NOT /Registration/\*" – just Mar 30 '16 at 10:02
  • So setting the **apple-app-site-association** file to `NOT /Registration/*` means https://example.com/Registration/ functions as expected but https://example.com/Registration/AccountActivation?activationCode=XXXX does not? – Alex Bauer Mar 30 '16 at 10:23
  • example.com/Registration/AccountActivation?activationCode=XXXX open my application, but i would like to open the link in Safari – just Mar 30 '16 at 10:26
  • try `"NOT /Registration/"` , check full details here http://stackoverflow.com/questions/35609667/how-to-support-universal-links-in-ios-app-and-setup-server-for-it – Vineet Choudhary Mar 30 '16 at 12:16
  • @VineetChoudhary "NOT /Registration/" not working – just Mar 30 '16 at 12:30
  • I am at a loss then. `"NOT /Registration/*"` ought to work, according to Apple's own specs. Shot in the dark...perhaps try `"NOT /Registration/*/*" – Alex Bauer Mar 30 '16 at 18:15
  • @AlexBauer "NOT /Registration/\*/\*" not working :( I really dont know what should I have to change... – just Mar 31 '16 at 08:53

2 Answers2

1

I do not have a fix for your problem, but I can give you a possible explanation. I'm leaving this here for reference in the hopes that I overlooked something.

Did you try reinstalling the app after changing the file? I had a simmilar problem not long ago. It seems that apple is only fetching the file once on install. From the orininal source:

During my troubleshooting, I discovered it’s best to verify an app is making the HTTPS request for the apple-app-site-association file. It’s important to know that apps only attempt to this once per installation. The request occurs the first time an app is launched after installation. Furthermore, force closing an app and then launching it will NOT trigger the app to reload apple-app-site-association.

via https://medium.com/@barsh/my-first-date-with-ios-universal-links-90dfabc88bb8#.wyrslx2di

As I said, there seems to be no solution on updating the file without a reinstall of the app.

c_k
  • 321
  • 1
  • 6
  • Ofcourse I reinstalled the app after every modifications. My temporary solution is that I dont use the NOT keyword – just Apr 13 '16 at 16:36
  • @user3275938 I did not mean to offend you. It just took me quite some time to figure out that it was necessary so it might help others if changes don't take. Whitelisting is not an option for us so we explicitly blacklist in our build process. – c_k Apr 14 '16 at 05:46
  • Verifying that a request was made for apple-app-site-association via the logs is a good idea. I've seen cases where the call simply isn't made. The whole system seems a bit touchy. – EricS Apr 23 '16 at 21:18
0

NOT /Registration is a match for yourdomain.com/Registration but not any subpath e.g. /Registration/AccountActivation....

I believe this should achieve what you're looking for:

{
 "applinks": {
  "apps": [],
  "details": [ {
   "appID": "XXXXXXXXX.com.example.app",
   "paths": [
    "NOT /Registration/*",
    "/*"
   ]
  }]
 }
}
Chris Maddern
  • 737
  • 5
  • 12