Search code examples
iossyntax-errorios-universal-links

Universal Link, AASA file component syntax wrong


I correctly have created Universal Link on iOS side and also successfully upload it to the domain. Apple Validate service shows me that all work fine but I can't open specific links because the syntax of the component wrong My file:

{
    "applinks": {
        "details": [
            {
                "appIDs": [ "K6789HNH.com.example-app" ],
                "components": [
                    {
                        "/": "/#/market/lettings"
                    },
                    {
                        "/": "/#/market/lettings/*"
                    },
                    {
                        "/": "/#/market/acquisitions"
                    },
                    {
                        "/": "/#/market/acquisitions/*"
                    }
                ]
            }
        ]
    },
    "webcredentials": {
      "apps": [ "K6789HNH.com.example-app" ]
    }
}

Example of links:

https://example.com/#/market/lettings/49830?view=grid
https://example.com/#/market/acquisitions/50134

I follow the Apple example of components https://developer.apple.com/videos/play/wwdc2019/717/ , time code 7:23 - 9:00 Image from example aboveenter image description here

What is my syntax problem with components?


Solution

  • The problem was in the symbol "#", it's a fragment, a little info about URL I change components to :

    "#": "*market/lettings*"
    

    and

    "#": "*market/acquisitions*"
    

    And all work well, symbol * used for handling all value between # and market/. Example: www.example.com/#.......market/lettings, instead of ... can be any of the symbols like www.example.com/#/market/lettings/123