0
私はアンドロイド用のubuntuでコードワイヤーを使用しています。コードバーiosデバイスはタップまで火災が発生しません
iosの場合はbuild.phonegap.comでコンパイルし、zipプロジェクトをアップロードします。
Androidですべてうまくいっていますが、他のものに注目したり変更したりするまで、ios devicereadyは起動しません。
ミインデックスは単純です:
<head>
<!--
Customize this policy to fit your own app's needs. For more guidance, see:
https://github.com/apache/cordova-plugin-whitelist/blob/master/README.md#content-security-policy
Some notes:
* gap: is required only on iOS (when using UIWebView) and is needed for JS->native communication
* https://ssl.gstatic.com is required only on Android and is needed for TalkBack to function properly
* Disables use of inline scripts in order to mitigate risk of XSS vulnerabilities. To change this:
* Enable inline JS: add 'unsafe-inline' to default-src
-->
<meta http-equiv="Content-Security-Policy"
content="
default-src 'self' https://ssl.gstatic.com data:* gap://* file://* tel:* 'unsafe-inline' 'unsafe-eval' ;
style-src 'self' 'unsafe-inline';
frame-src 'self' s-static.ak.facebook.com static.ak.facebook.com www.facebook.com;
connect-src 'self' https://app.mypage.es/ connect.facebook.net www.facebook.com;
media-src *;
img-src 'self' www.google-analytics.com www.facebook.com;
script-src 'self' 'unsafe-inline' www.google-analytics.com connect.facebook.net www.facebook.com">
<meta name="format-detection" content="telephone=no">
<meta name="msapplication-tap-highlight" content="no">
<meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width">
<link rel="stylesheet" type="text/css" href="css/index.css">
<title>Hello World</title>
</head>
<body>
<div class="app">
</div>
<script type="text/javascript" src="jquery-3.2.1.min.js"></script>
<script src="fastclick.js"></script>
<script type="text/javascript" src="cordova.js"></script>
<script type="text/javascript" src="js/index.js"></script>
</body>
</html>
とindex.jsが
document.addEventListener("deviceready", onDeviceReady, false);
function onDeviceReady() {....stuff}
私が正しいかどうatachイベント
へのコンテンツポリシーとdiferent方法にdiferent代替案を試してみてください方法?
私はweinreでデバッグを達成しています: 5秒後にdevicereadyが起動しませんでした。 チャンネルが起動しません:onCordovaConnectionReady チャンネルが起動しません:onCordovaInfoReady –