Question

External URLs don't open in the system's browser in my PhoneGap IOS application. I'm using PhoneGap Build 2.7.0.

Javascript:

window.open(myURL, '_blank', 'location=yes');

Config.xml

<plugins>
    <plugin name="InAppBrowser" value="CDVInAppBrowser" />
</plugins>

<access origin="*" />

How to solve this? when i using the url "www.google.com" it works fine but when i used required url for my app it did not worked even that url works fine in browser.

Was it helpful?

Solution

Javascript:

myURL = encodeURI(myURL);
window.open(myURL, '_blank', 'location=yes'); 

Using of encodeURI method fix the above issue

OTHER TIPS

Take reference from this link. I have used this plugin for my IOS application development way back. It works like a charm. Also, it is easy to integrate.

Hope it helps !

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top