0
votes

I'm using Ionic4 zbar to scan barcode. Every time I try to open the camera my application is crashing.I tried all different iphone devices. My codes works fine on android devices.

https://ionicframework.com/docs/native/zbar

Ionic:

Ionic CLI : 5.0.0 (/usr/local/lib/node_modules/ionic) Ionic Framework : @ionic/angular 4.4.0 @angular-devkit/build-angular : 0.12.4 @angular-devkit/schematics : 7.2.4 @angular/cli : 7.2.4 @ionic/angular-toolkit : 1.4.0

Cordova:

Cordova CLI : 9.0.0 ([email protected]) Cordova Platforms : android 7.1.4, ios 5.0.1 Cordova Plugins : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 3.1.2, (and 10 other plugins)

Utility:

cordova-res : 0.3.0 native-run : 0.2.2

System:

Android SDK Tools : 26.1.1 (/Users/conagrabrands/Library/Android/sdk) ios-deploy : 1.9.4 ios-sim : 8.0.1 NodeJS : v10.16.0 (/usr/local/bin/node) npm : 6.9.0 OS : macOS Mojave Xcode : Xcode 10.2.1 Build version 10E1001

Expected result is camera should open to scan the barcode.

1

1 Answers

1
votes

I never got this ZBar plugin working on ios... If you only want basic scanning features (barcode or qr-codes) I would advise to use the barcode scanner plugin

https://ionicframework.com/docs/native/barcode-scanner

This is really stable and works fine on my app on both Android and iOS devices