PhoneGap应用程序:外部URL不打开在IOS的InApp浏览器 [英] Phonegap App : External URL don't open in InApp Browser of IOS
本文介绍了PhoneGap应用程序:外部URL不打开在IOS的InApp浏览器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
外部URL不会在我的PhoneGap IOS应用程序的系统的浏览器中打开。我使用PhoneGap Build 2.7.0。
External URLs don't open in the system's browser in my PhoneGap IOS application. I'm using PhoneGap Build 2.7.0.
Javascript:
code> window.open(myURL,'_blank','location = yes');
window.open(myURL, '_blank', 'location=yes');
Config.xml
<plugins>
<plugin name="InAppBrowser" value="CDVInAppBrowser" />
</plugins>
<access origin="*" />
如何解决这个问题?当我使用urlwww.google.com它工作正常,但是当我使用必需的URL为我的应用程序,它没有工作,即使那个网址在浏览器中工作正常。
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.
推荐答案
Javascript:
myURL = encodeURI(myURL);
window.open(myURL, '_blank', 'location=yes');
使用encodeURI方法修复上述问题
这篇关于PhoneGap应用程序:外部URL不打开在IOS的InApp浏览器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文