PhoneGap Iphone アプリケーションで XZing を実行しようとしています。
いくつかの調査を行った後、XZing をアプリケーションにインストールするための最良の手順については、次のリンクを見つけました。
ビルド中に XCode 4 が .h ファイルを見つけられないのはなぜですか?
手順を完了し、エラーなしでアプリを実行しました。
今、スキャナーを実行しようとしています。BarcodeScanner テスト ファイルを使用しています。コードは次のとおりです。
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="format-detection" content="telephone=no" />
<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 onLoad="onLoad()">
<div class="app">
<div id="running-bits">
<button id="scan-button">scan: ?</button>
<p>(<span id="test-count-current">?</span>
/
<span id="test-count-total">?</span>)
<p><img id="image" src="">
<p>expected text:
<br><tt><span id="test-text">?</span></tt>
</div>
<p><b id="test-done"></b>
<br><button id="start-over">start over</button>
<p>Results:
<ul id="results-list">
</ul>
</div>
<script type="text/javascript" src="cordova-2.3.0.js"></script>
<script src="js/barcodescanner.js"></script>
<script src="js/phonegap-app.js"></script>
<script type="text/javascript" src="js/index.js"></script>
<script type="text/javascript">
app.initialize();
</script>
</body>
</html>
以下のリンクの phonegap-app.js のコード:
ただし、スキャナーのスキャンボタンをクリックすると失敗し、ログに次のエラーが表示されます。
BarcodeScanner の失敗: 例外スキャン: TypeError: '未定義' はオブジェクトではありません