You should be testing with your own hybrid app, like Cillus indicated. Do not forget to inlude the following plugin in the the Custom Phonegap/Cordova configuration, did you do that?
<plugin name="phonegap-plugin-barcodescanner" />
Are you also using ADFS or another authentication method? That might cause trouble. In that case you should follow these instructions: https://docs.mendix.com/howto/mobile/implement-sso-on-a-hybrid-app-with-mendix-and-saml
I have a similar issue (on Android) that's not solved for me yet (ticket 76489). In my case the problem is that after logging in using ADFS, Android keeps two WebView instances active instead of one (see image below). This can be detected using Chrome DevTools (https://docs.mendix.com/howto/mobile/debug-a-mobile-app).
You cannot test your barcode scanning widget with Mendix's testing app called "Mendix Mobile", like Fabian indicated.
This widget only works (with your camera) when you have a 'native' App on your phone.
Good luck! :-)
nothing wrong with your App, but the widget just does not work in the Mendix App, as stated in the widget documentation
This widget enables your mobile app to scan barcodes and QR codes. Note: this widget does not work in the Mendix Mobile app.