I'm using Universal links to process an HTTP URL if our app is installed.
This is working fine.
Here is my problem: There are limitations in SFSavariViewController so I can't use my url in a wevbiew, only in the browser on iOS 12.4.6 and up. On older devices, the URL is handled just to say that this not supported because of Safari limitations.
Because we also have an Android and Web application and for the sake of simplicity, we're sending an email to the user with the same http link that I want to handle, in both app when installed or through a web browser if not.
Why is that? Because the user is already anthenticated in the app, we call the server to generate an auth token that we'll use as an additonnal parameter to the HTTP URL the user clicked on.
On Android we open a Webview activity, so far so good.
On iOS I need to go back to Safari with this modified URL, but because I registered the URL to open the App, sharedApplication.openURL does nothing (probably because we're already in the app):
UIApplication.SharedApplication.OpenUrl(new NSUrl(targetUrl));
Here is my apple-app-site-association file:
{
"applinks": {
"apps": [],
"details": [
{
"appID": "52CCCFRG4D.com.hygeex.yakaetp",
"paths": ["/etp/webapp/conf_view.html"]
}
]
}
}
The URL that is sent by mail
https://mywebsite/etp/webapp/conf_view.html?r=40
The URL once processed by the app to add the token:
https://mywebsite/etp/webapp/conf_view.html?r=40&tk=ABCD.....GTYU
It seems there is a way to specify GET Parameters in the association file staring with iOS 13 but what about older plaforms? And I'm not even sure that will help in my use case.
May there is another solution that I've not seen yet. I did not found a way to launch Safari without using sharedApplication.openURL... Is there another way?
By now you should have understood that I can't simply return false from ContinueUserActivity.
Any help appreciated.