[Barcode Plugin] Issue with Barcode Plugin on Mobile (iOS)

Forge Component
(26)
Published on 21 May (2 weeks ago) by OutSystems R&D
26 votes
Published on 21 May (2 weeks ago) by OutSystems R&D

Dear All,

I added the barcode plugin and followed the instruction to set it up, but when I try it on my mobile I get an error code: undefined is not an object (evaluating 'cordova.plugins.barcodeScanner.scan'.

I'm facing this issue with different barcode/qr code scanner plugins.. Is there anything I have to consider when trying to use a barcode scan on iOS. Does it have to be considered on the provising file or anything like that?

For testing I added two checks - IsCordovaDefined as well as CheckBarcodePlugin. For Cordova I get a true, but the Barcode check gets back with an false.

Any ideas/suggestions are appreciated.

Thanks and regards,

Philipp

Solution

Quick question, did you re-build the iOS application and re-install it on your test iPhone?


Solution

Philipp Sauren wrote:

Dear All,

I added the barcode plugin and followed the instruction to set it up, but when I try it on my mobile I get an error code: undefined is not an object (evaluating 'cordova.plugins.barcodeScanner.scan'.

I'm facing this issue with different barcode/qr code scanner plugins.. Is there anything I have to consider when trying to use a barcode scan on iOS. Does it have to be considered on the provising file or anything like that?

For testing I added two checks - IsCordovaDefined as well as CheckBarcodePlugin. For Cordova I get a true, but the Barcode check gets back with an false.

Any ideas/suggestions are appreciated.

Thanks and regards,

Philipp

Hi Philipp


We also using the same plugin in IOS and its working.


As suggested by Bas could you please generate new IPA and check again.


Bas de Jong wrote:

Quick question, did you re-build the iOS application and re-install it on your test iPhone?


Thanks Bas - was a quick solution for it..


Philipp Sauren wrote:

Bas de Jong wrote:

Quick question, did you re-build the iOS application and re-install it on your test iPhone?


Thanks Bas - was a quick solution for it..



Good. Always rebuild the application when changing Cordova plugins. Otherwise it won't work.

Philipp Sauren wrote:

Bas de Jong wrote:

Quick question, did you re-build the iOS application and re-install it on your test iPhone?


Thanks Bas - was a quick solution for it..



Good. Always rebuild the application when changing Cordova plugins. Otherwise it won't work.