简体   繁体   中英

Apple App Site Association File Parsing Error

We're trying to get universal links working in our app but we are encountering errors when trying to download the Apple App Site Association file.

We've used various online tools to validate the file and they all say their is a parsing error but they don't go into any detail about what the issue is.

We've validated that the JSON is valid but what else could be wrong with the file contents?

{
  "applinks": {
      "details": [
           {
             "appIDs": [ "12345NGB.co.uk.my.app" ],
             "components": [
               {
                  "/": "/universallink/*",
                  "comment": "Matches any URL whose path starts with /universallink/"
               }
             ]
           }
       ]
   }
}

It turns the I did need to follow the format outlined here: https://developer.apple.com/library/archive/documentation/General/Conceptual/AppSearch/UniversalLinks.html

{
  "applinks": {
    "apps": [],
    "details": [{
      "appID": "12345NGB.co.uk.my.app",
      "paths": ["/universallink/*"]
    }]
  }
}

The Apple documentation is very misleading because it suggests that's an old format for supporting iOS 12 and earlier.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM