-1

My iOS app has to support a universal link to a page something like

https://example.com/#!/game/home

And I am having difficulties in getting this to work. I have created an AASA file like

{
    "applinks": {
        "apps": [],
        "details": [{
            "appID": "ASDF35SDF.ios.mybundle.com",
            "components": [{
                "/": "/#!/courses/*/home"
            }]
        }]
    }
}

I also tried with wildcards instead of directly adding "#!" in the AASA file.

{
    "applinks": {
        "apps": [],
        "details": [{
            "appID": "ASDF35SDF.ios.mybundle.com",
            "components": [{
                "/": "/*/courses/*/home"
            }]
        }]
    }
}

Both didn't work. I have verified that my AASA file is correctly read (server logs). I have other paths without "#!" in the AASA file which are working correctly (thus making sure my AASA file is read correctly).

Any help is appreciated.

Update 1

Tried with new fragment components, but no luck there either

{
    "applinks": {
        "apps": [],
        "details": [{
            "appID": "ASDF35SDF.ios.mybundle.com",
            "components": [{
                "#": "!/courses/*/home"
            }]
        }]
    }
}
Krishnabhadra
  • 34,169
  • 30
  • 118
  • 167
  • Anything after # is not in the path. It is the fragment. See [Apple's example](https://developer.apple.com/documentation/Xcode/supporting-associated-domains). You will have something like `"#":"!/courses/*/home"` – Paulw11 Nov 01 '22 at 20:05
  • @Paulw11 It didn't work, see my update in the question. I am wondering whether the exclamation point is causing the issues – Krishnabhadra Nov 02 '22 at 02:24
  • @Paulw11 It did in fact work. It seems there is a cache on the Apple CDN side. If you could post this as answer, I can accept it. – Krishnabhadra Nov 07 '22 at 06:50

1 Answers1

3

Anything after # is not in the path. It is the fragment.

Apple shows an example of using the fragment in their documentation

You will want something like

"#":"!/courses/*/home"

Apple will store your site association file in their CDN so it can take a number of days for changes to be seen by an app in production.

To avoid this causing problems while you are developing, you can add ;mode=developer to your domain entitlement and enable associated domains development in the developer menu on your device.

Paulw11
  • 108,386
  • 14
  • 159
  • 186