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:
func application(_ application: UIApplication, continue userActivity: NSUserActivity, restorationHandler: @escaping ([Any]?) -> Void) -> Bool {
// if it opened the app from some link
if userActivity.activityType == NSUserActivityTypeBrowsingWeb {
// the query will give you "result=xxxx"
if let query = userActivity.webpageURL?.query {
// code that pulls out the result from the string you get back
}
...
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 being applinks: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)