I’m new to voltbuilder and have a question about a plugin for barcode scanner. I have set up the config.xml as follows:
</gap:platforms>
<gap:plugin name="cordova-plugin-qr-barcode-scanner"/>
Voltbuider builds the IOS app with no errors…but when I installl to an ipad and try to use the barcode scanner I get a pop up that has this message
module cordova/plugin/barcodescanner not found
I thought that was odd since that isn’t the name of the plugin…so I clicked open the log on the voltbuilder upload page and saw several hits on the actual plugin name from the config.xml such as these
Discovered plugin "cordova-plugin-qr-barcode-scanner". Adding it to the project
No scripts found for hook "before_plugin_add".
No version specified for cordova-plugin-qr-barcode-scanner, retrieving version from config.xml
No version for cordova-plugin-qr-barcode-scanner saved in config.xml or package.json
Attempting to use npm info for cordova-plugin-qr-barcode-scanner to choose a compatible release
Calling plugman.fetch on plugin "cordova-plugin-qr-barcode-scanner@8.0.3"
fetch: Installing cordova-plugin-qr-barcode-scanner@8.0.3 to
later in the log I did see a hit on barcodescanner.js (the module that came up as not found when trying to run the app in ios ) as follows
copy platforms/ios/platform_www/plugins/cordova-plugin-qr-barcode-scanner/www/barcodescanner.js platforms/ios/www/plugins/cordova-plugin-qr-barcode-scanner/www/barcodescanner.js (updated file)
I then built it for Android with the only change being the voltbuilder.json file telling it to be Android…there’s was no change in the www code or the config.xml
It built with no errors and I could install it to my android phone and this time the scanner didn’t toss the error that the ipad did about module cordova/plugin/barcodescanner not found…instead it opened the camera to scan the barcode
Do I need to set the config.xml up differently for ios and Android builds ? I freely admit I am guessing since the setup was generic…and it works for Android with no specific about Android used in the config.xml but it didn’t work in ios (again with no specific’s about ios in the config.xml )