Ios Phonegap 3.0在应用浏览器侦听器中生成不工作

Ios Phonegap 3.0在应用浏览器侦听器中生成不工作,ios,cordova,Ios,Cordova,我希望有人能帮我解决这个问题。这是我的第一个Phonegap应用程序,所以这可能是我的一个基本错误。我特别想让它在iOS上运行。Android将等到下一天 我正在尝试使用inAppBrowser从外部站点(由我控制)加载页面。用户离开初始页面后,应关闭并返回应用程序。页面打开成功,但我已经尝试了所有我能想到的方法让它关闭并返回应用程序,但没有任何效果 使用inAppBrowser的函数如下所示: function open_page() { var ref = window.open(

我希望有人能帮我解决这个问题。这是我的第一个Phonegap应用程序,所以这可能是我的一个基本错误。我特别想让它在iOS上运行。Android将等到下一天

我正在尝试使用inAppBrowser从外部站点(由我控制)加载页面。用户离开初始页面后,应关闭并返回应用程序。页面打开成功,但我已经尝试了所有我能想到的方法让它关闭并返回应用程序,但没有任何效果

使用inAppBrowser的函数如下所示:

function open_page() {
     var ref = window.open('http://www.mydomain.com/page1.html', '_blank', 'location=yes,enableViewportScale=no');
     ref.addEventListener('loadstop', function(event) { if(event.url != "http://www.mydomain.com/page1.html") ref.close(); });
     ref.addEventListener('exit', function(event) { alert(event.type); });
}
<?xml version="1.0" encoding="UTF-8" ?>
<widget

...


<access origin="*" />

<preference name="phonegap-version" value="3.0.0" />

<preference name="orientation" value="portrait" />

<preference name="fullscreen" value="true" />

<preference name="stay-in-webview" value="true" />

<feature name="http://api.phonegap.com/1.0/battery"/>
<feature name="http://api.phonegap.com/1.0/camera"/>
<feature name="http://api.phonegap.com/1.0/contacts"/>
<feature name="http://api.phonegap.com/1.0/file"/>
<feature name="http://api.phonegap.com/1.0/geolocation"/>
<feature name="http://api.phonegap.com/1.0/media"/>
<feature name="http://api.phonegap.com/1.0/network"/>
<feature name="http://api.phonegap.com/1.0/notification"/>

<feature name="InAppBrowser">
    <param name="ios-package" value="CDVInAppBrowser" />
</feature>

<gap:plugin name="org.apache.cordova.device" /> 
<gap:plugin name="org.apache.cordova.camera" /> 
<gap:plugin name="org.apache.cordova.device-orientation" /> 
<gap:plugin name="org.apache.cordova.file" /> 
<gap:plugin name="org.apache.cordova.globalization" /> 
<gap:plugin name="org.apache.cordova.inappbrowser" />
<gap:plugin name="org.apache.cordova.network-information" /> 
<gap:plugin name="org.apache.cordova.dialogs" /> 
<gap:plugin name="org.apache.cordova.splashscreen" />

<gap:plugin name="org.apache.cordova.core.geolocation" /> 

</widget>
我正在使用基于云的Phonegap构建,我的config.xml文件如下所示:

function open_page() {
     var ref = window.open('http://www.mydomain.com/page1.html', '_blank', 'location=yes,enableViewportScale=no');
     ref.addEventListener('loadstop', function(event) { if(event.url != "http://www.mydomain.com/page1.html") ref.close(); });
     ref.addEventListener('exit', function(event) { alert(event.type); });
}
<?xml version="1.0" encoding="UTF-8" ?>
<widget

...


<access origin="*" />

<preference name="phonegap-version" value="3.0.0" />

<preference name="orientation" value="portrait" />

<preference name="fullscreen" value="true" />

<preference name="stay-in-webview" value="true" />

<feature name="http://api.phonegap.com/1.0/battery"/>
<feature name="http://api.phonegap.com/1.0/camera"/>
<feature name="http://api.phonegap.com/1.0/contacts"/>
<feature name="http://api.phonegap.com/1.0/file"/>
<feature name="http://api.phonegap.com/1.0/geolocation"/>
<feature name="http://api.phonegap.com/1.0/media"/>
<feature name="http://api.phonegap.com/1.0/network"/>
<feature name="http://api.phonegap.com/1.0/notification"/>

<feature name="InAppBrowser">
    <param name="ios-package" value="CDVInAppBrowser" />
</feature>

<gap:plugin name="org.apache.cordova.device" /> 
<gap:plugin name="org.apache.cordova.camera" /> 
<gap:plugin name="org.apache.cordova.device-orientation" /> 
<gap:plugin name="org.apache.cordova.file" /> 
<gap:plugin name="org.apache.cordova.globalization" /> 
<gap:plugin name="org.apache.cordova.inappbrowser" />
<gap:plugin name="org.apache.cordova.network-information" /> 
<gap:plugin name="org.apache.cordova.dialogs" /> 
<gap:plugin name="org.apache.cordova.splashscreen" />

<gap:plugin name="org.apache.cordova.core.geolocation" /> 

</widget>


将其添加到配置文件中-

   <access origin="*" browserOnly="true"/>

嗯,我仍然有这个问题。如果有帮助的话,inAppBrowser的选项似乎也不起作用-即,如果使用“location=yes”,则仍然没有位置栏。