PhoneGap: Opening external URL's in Safari

后端 未结 12 874
耶瑟儿~
耶瑟儿~ 2020-11-30 03:04

I\'ve just upgraded to PhoneGap 1.6.1 and I can no longer get external URL\'s to open in Safari.

Prior to this version I had patched AppDelegate.m as follows:

<
12条回答
  •  迷失自我
    2020-11-30 03:57

    In earlier version of cordova you can load a url in browser by adding target="_blank" to your links. But now you can use inApp browser feature.

    var ref = window.open(encodeURI('your url'), '_system', 'location=no');
    

    This opens the url in browser. Tested in Android and iPhone with cordova2.7.0

提交回复
热议问题