cordova - phonegap inappbrowser IOS not working -


i created project in phonegap ios , want open ulr in ios browser not inside app. tried use inappbrowser plugin seems doesn't working.

use .html, .css, .js files , config.xml , on windows , build project online tool adobe phonegap builder

if right, according link https: build.phonegap.com/plugins/658 there no need install plugin want use, suggest command cordova plugin add.... can have job done reffering plugin inside config.xml file. right?

config.xml file:

<?xml version="1.0" encoding="utf-8"?>  <widget xmlns = " www.w3.org/ns/widgets"         xmlns:gap = " phonegap.com/ns/1.0"     id    = "com.test.testingapp"     version   = "1.0.0">      <name>test</name>      <!-- app icons , splashscreen -->     <icon src="icon.png" />      <gap:splash src="splash.png" />      <platform name="android">         <icon density="mdpi" src="res/android/icon-48-hdpi.png" />         <icon density="hdpi" src="res/android/icon-72-hdpi.png" />         <icon density="xhdpi" src="res/android/icon-96-hdpi.png" />         <icon density="xxhdpi" src="res/android/icon-144-hdpi.png" />          <gap:splash gap:density="mdpi" src="splash.png" width="320" height="470" />         <gap:splash gap:density="hdpi" src="splash.png" width="480" height="640" />         <gap:splash gap:density="xhdpi" src="splash.png" width="720" height="960" />         <gap:splash gap:density="xxhdpi" src="splash.png" />     </platform>      <platform name="ios">     <!-- ios 7.0+ -->     <!-- iphone / ipod touch  -->         <icon src="res/ios/icon-60.png" width="60" height="60" />         <icon src="res/ios/icon-60@2x.png" width="120" height="120" />         <!-- ipad -->         <icon src="res/ios/icon-76.png" width="76" height="76" />         <icon src="res/ios/icon-76@2x.png" width="152" height="152" />         <!-- ios 6.1 -->         <!-- spotlight icon -->         <icon src="res/ios/icon-40.png" width="40" height="40" />         <icon src="res/ios/icon-40@2x.png" width="80" height="80" />         <!-- iphone / ipod touch -->         <icon src="res/ios/icon.png" width="57" height="57" />         <icon src="res/ios/icon@2x.png" width="114" height="114" />         <!-- ipad -->         <icon src="res/ios/icon-72.png" width="72" height="72" />         <icon src="res/ios/icon-72@2x.png" width="144" height="144" />         <!-- iphone spotlight , settings icon -->         <icon src="res/ios/icon-small.png" width="29" height="29" />         <icon src="res/ios/icon-small@2x.png" width="58" height="58" />         <!-- ipad spotlight , settings icon -->         <icon src="res/ios/icon-50.png" width="50" height="50" />         <icon src="res/ios/icon-50@2x.png" width="100" height="100" />     </platform>       <preference name="phonegap-version" value="3.3.0" />        <!-- splashscreen delay -->     <preference name="splashscreendelay" value="5000" />       <access origin="*" browseronly="true"/>      <!-- <content src=" mysite.com/myapp.html" /> external pages -->     <content src="index.html" />      <preference name="loglevel" value="debug" />      <!-- <preference name="orientation" value="portrait" /> -->    <preference name="loadurltimeoutvalue" value="20000" />   <preference name="inappbrowserstorageenabled" value="true" />     <!--   <preference name="splashscreen" value="resourcename" />   <preference name="backgroundcolor" value="0xfff" />   <preference name="loadurltimeoutvalue" value="20000" />   <preference name="inappbrowserstorageenabled" value="true" />   <preference name="disallowoverscroll" value="true" />     <preference name="keeprunning" value="false" />     -->       <feature name="app">   <param name="android-package" value="org.apache.cordova.app"/>     </feature>     <feature name="geolocation">   <param name="android-package" value="org.apache.cordova.geobroker"/>     </feature>     <feature name="device">   <param name="android-package" value="org.apache.cordova.device"/>     </feature>     <!--     <feature name="accelerometer">   <param name="android-package" value="org.apache.cordova.accellistener"/>     </feature>     <feature name="compass">   <param name="android-package" value="org.apache.cordova.compasslistener"/>     </feature>     <feature name="media">   <param name="android-package" value="org.apache.cordova.audiohandler"/>     </feature>     <feature name="camera">   <param name="android-package" value="org.apache.cordova.cameralauncher"/>     </feature>     <feature name="contacts">   <param name="android-package" value="org.apache.cordova.contactmanager"/>     </feature>     <feature name="file">   <param name="android-package" value="org.apache.cordova.fileutils"/>     </feature>     -->     <feature name="networkstatus">   <param name="android-package" value="org.apache.cordova.networkmanager"/>     </feature>     <feature name="notification">   <param name="android-package" value="org.apache.cordova.notification"/>     </feature>     <!--     <feature name="storage">   <param name="android-package" value="org.apache.cordova.storage"/>     </feature>     <feature name="filetransfer">   <param name="android-package" value="org.apache.cordova.filetransfer"/>     </feature>     <feature name="capture">   <param name="android-package" value="org.apache.cordova.capture"/>     </feature>     <feature name="battery">   <param name="android-package" value="org.apache.cordova.batterylistener"/>     </feature>     -->     <feature name="splashscreen">   <param name="android-package" value="org.apache.cordova.splashscreen"/>     </feature>     <feature name="splashscreen">         <param name="ios-package" value="cdvsplashscreen" />     </feature>     <!--     <feature name="echo">   <param name="android-package" value="org.apache.cordova.echo"/>     </feature>     <feature name="globalization">   <param name="android-package" value="org.apache.cordova.globalization"/>     </feature>     -->     <feature name="inappbrowser">          <param name="android-package" value="org.apache.cordova.inappbrowser.inappbrowser"/>     </feature>     <feature name="inappbrowser">         <param name="ios-package" value="cdvinappbrowser" />      </feature>      <!-- deprecated plugins element. remove in 3.0 -->     <plugins>         <gap:plugin name="org.apache.cordova.inappbrowser" version="0.3.3" />     </plugins> </widget> 


index.html file is:

<html>  <head>           <meta charset="utf-8" />     <meta id="extviewportmeta" name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no" />      <title>hello world</title>      <script type="text/javascript" charset="utf-8" src="cordova.js"></script>     <script type="text/javascript" charset="utf-8" src="cordova_plugins.js"></script>      <link rel="stylesheet" href="  code.jquery.com/mobile/1.4.2/jquery.mobile-1.4.2.min.css">      <script src="  code.jquery.com/jquery-1.10.2.min.js"></script>     <script src="  code.jquery.com/mobile/1.4.2/jquery.mobile-1.4.2.min.js"></script>  </head>   <body>  <div data-role="page">      <!-- main body -->     <div data-role="content" role="main" style="padding-bottom:230px;">         <div class="main_header">                     <br />                           <a href="#" onclick="window.open(' www.google.com', '_blank', 'location=yes'); return false;">plantech</a>                     <br />                           <a href="#" onclick="window.open(' www.google.com', '_system', 'location=no');return false; ">plantech</a>         </div>     </div> </div>  <div id="highlight"></div> </body> </html> 



problem both links open inside app (and not in separate browser supposed to). result, there no chance index.html page after 1 of links clicked without ending app , restarting it.

appreciate if me go through this, because searched several times internet , stuck.

in advance time.

i have solution ... there no chance index.html page after 1 of links clicked

if go through complete documentation,

1 - return window object

     var ref = window.open ('www.google.com', '_blank', 'location=yes'); 

2 - add event listener exit event.

    ref.addeventlistener(exit, myexitcallback); 

3 - close method close browser window. so, in function call :

function myexitcallback{    ref.close(); } 

hope solve problem. luck.


Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

Python ctypes access violation with const pointer arguments -