PhoneGapのドキュメントによると、JavaScript の概念実証を次のように記述できます。
window.plugins.barcodeScanner.scan(
function(result) {
if (result.cancelled)
alert("the user cancelled the scan")
else
alert("we got a barcode: " + result.text)
},
function(error) {
alert("scanning failed: " + error)
}
)
しかし、その後、XCode プロジェクトについて話し始めます。
Q: PhoneGap のバーコードスキャナー機能を使用するには、XCode アプリを作成する必要がありますか?