iosios-universal-linksapple-app-site-associateapple-app-site-association

iOS universal links only opens app if "path" has a specific syntax with regards to linebreaks and spaces


im trying to set up universal links in a react-native project, thought this part shouldt have anything to do with react-native.

i have uploaded the file correctly at: example.com/.well-known/apple-app-site-association

i created a simple html file to test the universal link: open

but im having a wierd problem where the syntax of the "path" section determines if the universal link works or not.

this does not work:

syntax 1:

"paths": [
   "*"
]

syntax 2:

"paths": ["*"]

however, this works:

syntax 3:

"paths": [ "*" ]

i prefer syntax 1, as i think its the most clean one. especially if i start adding more routes. i want this one to work, i dont want to use syntax 2 or 3.

i also checked some other websites like facebook and youtube, and they all have the syntax 1, with linebreaks for every path.

i cant imagine why linebreaks and spaces have any effect. what could possibly be an explanation for this?


Solution

  • well i found the problem, its not spaces or linebreaks that determined if my deep links worked or not. i made a typo. i find it weird that the typo only broke the deep links in some circumstances and not others, but oh well.

    i wrote the applinks property with camelcase, like so: appLinks. it should all be lowercase. applinks is the correct spelling.