Zxing for iphone using HTML5/javascript
i am new to ios development .
can anybody pls tell me . is it possible to use Zxing lib for scanning bar/qr-code on iPhone for a webapp(HTML5/javascript) ?
开发者_StackOverflow社区i mean my webapp needs to use Zxing , Is it possible ?
Barcode scanning requires use of the camera on your phone, this device is not available from a webapp and therefore you cannot scan barcodes from the webapp, regardless of the library you would like to use.
Also, I dont think you can use C, C++, Objective C libraries from your javascript/html5 these libs would have to be on the phone where your code cannot get to it, and your browser most certainly cant run it.
One alternative would be PhoneGap, I am not too familiar with it, but it is an iOS (and or Android) shell around a webapp that runs as a native app. You could probably get camera support in there and maybe use the Zxing lib. You would have to look into that, but then you dont 'really' have a webapp anymore either.
EDIT: For phoneGap and Zxing see also: how to scan barcode using phonegap
These days you can get it working with the HTML5 Camera API and this little beauty; https://github.com/LazarSoft
enjoy.
精彩评论