I'm not an expert on this, but is there any reason to have three App Clip experiences set up for what look like very similar URLs? I could understand having a unique App Clip Experience set up for https://example.com and https://example.com/subpath, but I'm not sure why you'd need an additional App Clip Experience set up for https://example.com/subpath?type=x (unless you're trying to do something where the x
parameter is a unique business/location/event, so if the invocation URL is something like https://example.com/subpath?type=123 then you'd want a custom App Clip Experience, but if the invocation URL is something like https://example.com/subpath?type=456, then you would want it to fall back to the https://example.com/subpath)?
In the Configuring the launch experience of your App Clip docs, specifically in the [Take advantage of URL prefix matching](Take advantage of URL prefix matching) section, there's some detail about the suggestion being to register as few URLs as possible, so that you can take advantage of prefix matching. Depending on your needs, I'd probably suggest just registering one App Clip Experience at https://example.com, and when you invoke your App Clip from a QR code, the App Clip can pass the entire URL into the app (which you get in your AppDelegate
or SceneDelegate
or App
as a NSUserActivity
), and then you can parse the full URL and get the path/query parameters and do what you need to do to customize the experience.
In my opinion, I'd;
- Register one App Clip experience as https://example.com and set up the AASA file accordingly.
- Build out your QR codes/App Clip codes with the full URL you need (https://example.com/subpath?type=123, for example)
- Handle the proper experience in-app when you get the
NSURLActivity
and parse the URL to get the path and query path parameters so you handle accordingly). - If that doesn't work for your use case, note that the article says The system then chooses the App Clip experience with the URL that has the most specific matching prefix. In theory, the matching should occur in the order you have listed in your post, since the matching would be more specific to the subpath with the parameters over just the subpath over just the base URL.
Also worth considering; if you're using something like https://example.com/subpath?type=x for a unique business or other entity that you want a custom App Clip card for, maybe set up some sort of subdomain like somebusiness.example.com that redirects to https://example.com/subpath?type=x either server-side, or handle that custom subdomain in-app, so you don't have to have three URLs set up with super similar URLs and can better separate them.