Search code examples
iphoneiosxcodecordovainappbrowser

Phonegap App : External URL don't open in InApp Browser of IOS


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.


Solution

  • Javascript:

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

    Using of encodeURI method fix the above issue