Learn Courses My Dashboard

Help! AVFoundation read code PDF417 problems

Hi community!! how are all you guys??

so let me start, some time ago I Started a project were I need to read a barcode in PDF417 format (In case you want to know I left the Link if you want to know more). I follow al the steps and I was able to read the barcode but not all the time (link to Apple Developer).

Now, I have the problem that when I use the AVFoundation library and specially the AVMetadataMachineReadableCodeObject class, the class only read part of the code.
I tried to follow the why it’s only reading part of the code and I saw that hen see a bunch of zeros. it takes the assci 00 as nil (Or null).

I tried to change the format from String to bytes but it has been imposible. There are any forme that I can solve this problem

thanks for your help!!!

have you considered using a cocoapods barcode scanner library instead?

if you are not familiar with cocoapods check out our tutorial here CocoaPods Tutorial using Swift and Xcode

Hi Francis!

I tried cocoapods with ZXing but didn’t work, I having the same problem with the doble zero. I had the feeling that all of that pods are base on the AVfundation library and the problem’s origin is there