Phonegap-plugin-barcodescanner: Codabar support for iOS

Created on 8 Apr 2016  路  2Comments  路  Source: phonegap/phonegap-plugin-barcodescanner

What's the possibility of this?

enhancement

Most helpful comment

For anyone else wrestling with this...

It turns out that:

  • Old versions of this plugin, in iOS, used an (ancient) snapshot of the ZXing c++ port. That library didn't support Codabar at the time.

  • At some point, the iOS version switched to using the iOS AV Foundation framework instead, delegating the barcode decoding to AVCaptureMetadataOutput. This framework doesn't support codabar either. This switch was necessary due to memory leaks found in the old c++ zxing approach, discovered when iOS 10 landed on everyone.

I've attempted to integrate this plugin with a more recent Objective C port of ZXing. This does support codabar, along with a few extra formats currently missing from the iOS version of this plugin.

My attempt is over here:
https://github.com/otherchirps/phonegap-plugin-barcodescanner

A more serious effort to do the same thing was already underway:
https://github.com/dually8/BarcodeScanner

I've only just got my version working, and my iOS project is now scanning codabar barcodes. I'm hoping that this approach doesn't suffer the same memory leak issues that prompted the original switch to AV Foundation. So far I haven't seen any spikes in memory usage, but it's early days yet.

Hopefully between my version and the dually8 project, a way forward on this can be found.

All 2 comments

For anyone else wrestling with this...

It turns out that:

  • Old versions of this plugin, in iOS, used an (ancient) snapshot of the ZXing c++ port. That library didn't support Codabar at the time.

  • At some point, the iOS version switched to using the iOS AV Foundation framework instead, delegating the barcode decoding to AVCaptureMetadataOutput. This framework doesn't support codabar either. This switch was necessary due to memory leaks found in the old c++ zxing approach, discovered when iOS 10 landed on everyone.

I've attempted to integrate this plugin with a more recent Objective C port of ZXing. This does support codabar, along with a few extra formats currently missing from the iOS version of this plugin.

My attempt is over here:
https://github.com/otherchirps/phonegap-plugin-barcodescanner

A more serious effort to do the same thing was already underway:
https://github.com/dually8/BarcodeScanner

I've only just got my version working, and my iOS project is now scanning codabar barcodes. I'm hoping that this approach doesn't suffer the same memory leak issues that prompted the original switch to AV Foundation. So far I haven't seen any spikes in memory usage, but it's early days yet.

Hopefully between my version and the dually8 project, a way forward on this can be found.

Any update on this?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

SunboX picture SunboX  路  9Comments

camilonos77 picture camilonos77  路  7Comments

HallmediaDigital picture HallmediaDigital  路  4Comments

luckylooke picture luckylooke  路  6Comments

vespino picture vespino  路  9Comments