we're trying to implement app indexing on iOS using the Apple Universal Links (I'm looking at https://developer.apple.com/library/ios/documentation/General/Conceptual/AppSearch/UniversalLinks.html#//apple_ref/doc/uid/TP40016308-CH12-SW2).
In the "Creating and Uploading the Association File" section I see I can limit the indexing to specific pages, which is good.
I'd like to limit the indexing to https://www.mywebsite.com?parameter=something, how can I?
I was thinking about something like that:
{
"applinks": {
"apps": [],
"details": [
{
"appID": "MYID",
"paths":[ "*?parameter=*" ]
}
]
}
}
Do you think it could work? I can't test it yet because it takes time to get the authorization for uploading files on the website root directory, that's why I'm asking you if you think it could work, I'd like to upload the file just once if I can.
Thank you
NO, Currently #(inline-links) and ?(query-parmeter) not supported by
Universal Links. Apple not provided any format to supportInline-Links&Query-Parmeterinapple-app-site-associationfile.In order to do indexing to https://www.mywebsite.com?parameter=something, I'm using the following JSON file.
If you want to limit the indexing only to some parameter for example
query_parmeter1andquery_parmeter2then you need to handle this in UIApplicationDelegate method[UIApplicationDelegate application: continueUserActivity: restorationHandler:]something like thisObjective-C:
Swift:
Note: This trick won't prevent the app from opening when a link to the website is clicked. But you can check If URL meets your requirement or not if not then you can open your URL in the web browser again. Similar to Amazon App -
References - Handle query parameters in universal links