I have an application (app A) that is running in a UIWebView wrapper. I have another application (app B) that needs to be shown and accept some data from the first one. Currently we are detecting window.open
(from app A) in the wrapper and creating a new controller with second WebView that slides in and contains app B.
In app A's JS code:
var appBWindow = window.open("APP_B_URL");
// Checking inside of setInterval for existence
// of the .init() that is set by app B on its window
// when it's found we call it and pass it some data
function onAppBWindowLoad() {
appBWindow.init(someData);
}
This works fine on both desktop and iOS Safari, but using UIWebView appBWindow.init
never changes. It looks like the JSContexts
was not connected the same way as they are in Safari/Chrome.
Is there a way how to make sure the appBWindow
works the same as it would in a regular browser?