Page 1 of 1

Event "Navigate to Link" - "Open in New Window" doesn't work on iOS as expected.

Posted: Thu Jun 27, 2013 10:14 am
by Joe Johnson

Event "Navigate to Link" - "Open in New Window" doesn't seem to work on iOS as expected.
This is the code generated by Appery for the event
window.open('http://www.google.com', 'NewWindow', 'width=600,height=400,toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes,copyhistory=yes,resizable=yes');

When viewing the app in a browser, clicking the button launches the external URL in a popup window correctly.

When I build and deploy an IPA to my iOS 6 device, clicking the button has no effect.

Viewing the iOS device console shows the following error:
Jun 27 18:33:16 Test[2302] : ERROR: Plugin 'InAppBrowser' not found, or is not a CDVPlugin. Check your pluginmapping in config.xml.

I was successfully able to launch the external URL using ChildBrowser with the following javascript bound to the button click event:

var cb = window.plugins.childBrowser;
if(cb != null) {
cb.showWebPage("http://www.google.com");
}

However I would prefer to use InAppBrowser rather than legacy ChildBrowser.


Event "Navigate to Link" - "Open in New Window" doesn't work on iOS as expected.

Posted: Thu Jun 27, 2013 11:21 am
by Maryna Brodina

Hello! Could you try with vclick event instead of click?


Event "Navigate to Link" - "Open in New Window" doesn't work on iOS as expected.

Posted: Wed Jul 03, 2013 5:12 pm
by SteveLacy

I found that the problem isn't between a vclick and a click, but that there is a problem with the PhoneGap export for iOS. "window.open" is not supported properly on iOS export. The work around is to use the chldBrowser.

Although I would like to open a link in Safari on the iOS device from within the app. Is there anyway to do this using Appery?


Event "Navigate to Link" - "Open in New Window" doesn't work on iOS as expected.

Posted: Wed Jul 03, 2013 8:11 pm
by Kateryna Grynko

Hi Steve,

Appery.io app includes Apache Cordova (PhoneGap) library. You can use any of the JavaScript API provided by PhoneGap. Unfortunately, we do not have the needed plug-in default. You would need to add it manually by exporting your app to IDE.

You should remember Appery.io app can't be imported back after making changes.

Read more here: http://docs.phonegap.com/en/2.4.0/cor...