javascript - Links to open in Safari browser, using Phonegap 3.3 -


i've built app using purely html, css , js within phonegap build 3.3. want include number of links websites, i'd open in safari rather in-app browser. can shed light? i've tried of obvious js using _system target etc.

config.xml below:

<?xml version="1.0" encoding="utf-8" ?> <widget      xmlns = "http://www.w3.org/ns/widgets"     xmlns:gap   = "http://phonegap.com/ns/1.0"     version     = "1.1.0">      <preference name="orientation" value="portrait"/>     <preference name="target-device" value="universal"/>     <preference name="fullscreen" value="false"/>     <preference name="disable-cursor" value="true"/>     <preference name="android-installlocation" value="auto"/>     <preference name="disallowoverscroll" value="true"/>     <preference name="webviewbounce" value="false"/>      <gap:config-file platform="ios" parent="uisupportedinterfaceorientations" overwrite="true">     <array>         <string>uiinterfaceorientationlandscapeomg</string>     </array>     </gap:config-file>      <access origin="*" browseronly="true" />      <preference name="permissions" value="none"/>      <gap:splash src="splash.png" />      <icon src="icon.png" gap:platform="ios" width="57" height="57" />     <icon src="icon-72.png" gap:platform="ios" width="72" height="72" />     <icon src="icon@2x.png" gap:platform="ios" width="114" height="114" />     <icon src="icon-72@2x.png" gap:platform="ios" width="144" height="144" />      <gap:splash src="splash/ios/default.png" width="320" height="480" />     <gap:splash src="splash/ios/default_at_2x.png" width="640" height="960" />     <gap:splash src="splash/ios/default_iphone5.png" width="640" height="1136" />     <gap:splash src="splash/ios/default-landscape.png" width="1024" height="768" />     <gap:splash src="splash/ios/default-portrait.png" width="768" height="1024" />  </widget> 

thanks help.

you still need use inappbrowser plugin configure way in config.xml:

<gap:plugin name="org.apache.cordova.inappbrowser" /> <feature name="inappbrowser">     <param name="ios-package" value="cdvinappbrowser" /> </feature> <preference name="stay-in-webview" value="false" /> 

then in js code:

window.open(url, "_system"); 

see here inappbrowser documentation.


Comments

Popular posts from this blog

c++ - OpenCV Error: Assertion failed <scn == 3 ::scn == 4> in unknown function, -

php - render data via PDO::FETCH_FUNC vs loop -

The canvas has been tainted by cross-origin data in chrome only -