barcode scanner not working on iOS

1
Barcode scanner widget works fine on Android but on iOS I get an Error message "Scanning failed: undefined".  Any suggestions? Also, does anyone know whether you can run this widget directly from a microflow? I want the scanner to open immediately after showing the page that the widget is on rather than the user having to click on the barcode scanner button.
asked
3 answers
1

I just got it working myself on iOS.

Very important part that many probably will forget as it is rarely mentioned: 

You will need to add the following code to the custom Phonegap/Cordova configuration XML at the bottom of the mobile deployment page:

<plugin name="phonegap-plugin-barcodescanner" />
<edit-config target="NSCameraUsageDescription" file="*-Info.plist" mode="merge">
    <string>To scan barcodes</string>
</edit-config>

This edit-config line has also become mandatory on iOS since this widget has been created and the scanner will not work on iOS without it.

 

answered
0

Hi William, try installing the Mendix Mobile App on your iOS device, open the Mendix project and try to reproduce the issue. Then let us know if the issue still occurs or not.

answered
0

Sounds to me like you might be missing the barcode scanner plugin in your Cordova app wrapper. Check your config.xml file for this:

<plugin name="phonegap-plugin-barcodescanner" />

 

answered