Ios 应用浏览器中的Phonegap不工作
我在AppBrowser中对插件cordova plugin进行了一个简单的测试,但它不起作用,请帮助。 我所做的: 1.phonegap创建phonegap默认值Ios 应用浏览器中的Phonegap不工作,ios,cordova,phonegap-plugins,cordova-plugins,Ios,Cordova,Phonegap Plugins,Cordova Plugins,我在AppBrowser中对插件cordova plugin进行了一个简单的测试,但它不起作用,请帮助。 我所做的: 1.phonegap创建phonegap默认值 2.phonegap插件在应用浏览器中添加cordova插件--保存 3.将此行添加到“app”div底部的www/index.html: index.html如下所示: <html> <head> <meta charset="utf-8" /> <meta name=
2.phonegap插件在应用浏览器中添加cordova插件--保存
3.将此行添加到“app”div底部的www/index.html:
index.html如下所示:
<html>
<head>
<meta charset="utf-8" />
<meta name="format-detection" content="telephone=no" />
<meta name="msapplication-tap-highlight" content="no" />
<!-- WARNING: for iOS 7, remove the width=device-width and height=device-height attributes. See https://issues.apache.org/jira/browse/CB-4323 -->
<meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width, height=device-height, target-densitydpi=device-dpi" />
<link rel="stylesheet" type="text/css" href="css/index.css" />
<title>Hello World</title>
</head>
<body>
<div class="app">
<h1>PhoneGap</h1>
<div id="deviceready" class="blink">
<p class="event listening">Connecting to Device</p>
<p class="event received">Device is Ready</p>
</div>
<a href="var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes');"><h1>Test</h1></a>
</div>
<script type="text/javascript" src="cordova.js"></script>
<script type="text/javascript" src="js/index.js"></script>
<script type="text/javascript">
app.initialize();
</script>
</body>
你好,世界
音差
连接到设备
设备已准备就绪
app.initialize();
我的Phonegap版本是5.4.1。提前谢谢。我想你应该补充:
<access origin="http://apache.org" subdomains="true" />
要在Android上使用此插件,还应添加cordova插件白名单插件:
我能知道为什么这会被否决吗?
<access origin="http://apache.org" subdomains="true" />
<feature name="InAppBrowser">
<param name="ios-package" value="CDVInAppBrowser" />
</feature>