11 thoughts
last posted Feb. 20, 2017, 12:04 a.m.

10 earlier thoughts


So it seems to be working...

Was about ready to rage-quit, when I stumbled across a similar effort made prior to Xcode 8 & iOS 10 coming out and mucking up everyone.

They looked to be adapting the plugin code before they ripped out all their c++ zxing-all-in-one calls and replaced them with the AV Foundation metadata apis.

So I wasn't using those parts, since I was pretty much using the sample code from ZXingObjC.

However, the part that just wasn't coming together for me was the cordova plugin.xml file, which instructs cordova how to build the different versions of the plugin for each platform.

In the case of iOS, the plugin.xml instructs cordova how to assemble the Xcode project.

Most of the dually8/BarcodeScanner plugin.xml was a drop-in replacement for what I'd tried. Only needed 2 ZXingObjC files added to get it going, since they'd only been created in the months since their last update.

With the corrected plugin.xml, and referencing the plugin from its git repo (see an earlier comment why file:// refs are bad...), the Xcode project built successfully.

Had a couple of minor syntax errors in the Objective C changes I'd bashed in there, but other than that, my iOS device was suddenly, and somewhat surprisingly, scanning CODABAR barcodes.

Last hurdle will be to see if the memory leak / crashing issues that the original projects came across rear their heads. But, so far so good...