Phonegap app: external url not opening in IOS InApp browser

External URLs do not open in the system browser in the PhoneGap IOS app. I am 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 use the URL "www.google.com" it works fine, but when I used the required URL for my application, it didnโ€™t work even with the url working fine in the browser.

+4
source share
2 answers

Javascript:

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

Using encodeURI method fixes the problem above

+5
source

Pay attention to the this link. I used this plugin to develop iOS applications. It works great. In addition, it is easy to integrate.

Hope this helps!

+1
source

Source: https://habr.com/ru/post/1490696/


All Articles