4

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.

CodingIntrigue
  • 71,301
  • 29
  • 165
  • 172
Shashi
  • 1,105
  • 4
  • 19
  • 38

2 Answers2

5

Javascript:

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

Using of encodeURI method fix the above issue

Shashi
  • 1,105
  • 4
  • 19
  • 38
1

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 !

MAST3RMIND
  • 592
  • 2
  • 14