I have a first iOS native app (let's say the "caller app") that opens a second one (let's say "callee app") with an URL of the form https://calleeapp.com
(Universal Link). I want the user to perform some task in the "callee app", and when finished then I want to go back automatically to the "caller app" providing the result of such task (URL would be then something similar to https://callerapp.com/check?result=xxxx
).
What should be the best/appropriate way to handle this?
We'll, you'd need to be able to have code on both the callee and caller app then to do this. (Unless a third party app implements some sort of API for callback URLS).
On the caller app though you'd want to look at the following AppDelegate method:
You also have to actually support the universal link by making sure that your
AppName.entitlements
has the an Associated Domains key with one of the values beingapplinks:callerapp.com
so that the caller app knows it can open urls in that scheme. (And vice versa on the callee app if you're also implementing that)