Accessing information from another app via context switching on iOS

Good day to all,

For the app that I was tasked to do, I have to open another app(Let’s call it ABC) on my iPad, allow some functions to run on it, and then for ABC to return some results from the function into my app for it to process.

I have tried to open the external app via inappbrowser cordova plugin and have some success. I was able to pass params into the app and the native app was able to receive the params. The issue occurs when ABC sends the info back to me. I was able to console log the information received in the AppDelegate.m file but I was unable to make the connection between that and my cordova plugin for me to properly receive the information.

Here is the code in my AppDelegate.m that allowed me to log out my params received.

  • (BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options {

    NSLog(@“Open from other app !!”);
    NSLog(@“Full URL: %@”, url);

    NSURLComponents *urlComponent = [[NSURLComponents alloc] initWithURL:url resolvingAgainstBaseURL:true];
    NSString *host = urlComponent.host;

    NSLog(@“Host: %@”, host);

    NSString *stringValue = urlComponent.queryItems.firstObject.value;

    NSLog(@“string value: %@”, stringValue);

    return true;
    }

Is there a way I can retrieve this information for my cordova plugin? I am rather lost in this. Any help would be greatly appreciated.

My ionic Info:

Ionic:

ionic (Ionic CLI) : 4.10.0 (/Users/XXX/node_modules/ionic)
Ionic Framework : @ionic/angular 4.11.7
@angular-devkit/build-angular : 0.801.3
@angular-devkit/schematics : 8.1.3
@angular/cli : 8.1.3
@ionic/angular-toolkit : 2.1.1

Cordova:

cordova (Cordova CLI) : 9.0.0 (cordova-lib@9.0.1)
Cordova Platforms : browser 6.0.0, ios 5.1.1
Cordova Plugins : cordova-plugin-ionic-keyboard 2.2.0, cordova-plugin-ionic-webview 4.1.3, (and 14 other plugins)

System:

ios-deploy : 1.10.0
ios-sim : 8.0.2
NodeJS : v10.16.3 (/Users/XXX/.nvm/versions/node/v10.16.3/bin/node)
npm : 6.9.0
OS : macOS Mojave
Xcode : Xcode 11.3 Build version 11C29