PhoneGap BarcodeScanner Plugin
Deprecated for Cordova 9.0 or higher.
iOS Quirks
Since iOS 10 it's mandatory to provide usage description in the info.plist if trying to access privacy-sensitive data. When the system prompts the user to allow access, this usage description string will displayed as part of the permission dialog box, but if you didn't provide the usage description, the app will crash before showing the dialog. Also, Apple will reject apps that access private data but don't provide usage description.
This plugins requires the following usage descriptions:
NSCameraUsageDescriptionspecifies the reason for your app to access the device's camera.
To add these entries into the info.plist, you can use the <edit-config> tag in the config.xml file like this:
<edit-config target="NSCameraUsageDescription" file="*-Info.plist" mode="merge">
<string>To scan barcodes</string>
</edit-config>Enable Plugin in Monaca
From the IDE menu, go to
Configure → Cordova Plugin Settings.Under Available Plugins section, hover over the
Phonegap BarcodeScannerplugin and clickEnablebutton.

PhoneGap BarcodeScanner Demo
Here is a simple example demonstrating how to use the PhoneGap BarcodeScanner Plugin with Monaca:
See Also:
Last updated
Was this helpful?