yeahdongcn / RSBarcodes_Swift

1D and 2D barcodes reader and generators for iOS 8 with delightful controls. Now Swift.
MIT License
707 stars 185 forks source link

Cannot generate interleaved2of5 #148

Closed kenneth-adams97 closed 2 years ago

kenneth-adams97 commented 2 years ago
  let gen = RSUnifiedCodeGenerator.shared

gen.fillColor = UIColor.white
        gen.strokeColor = UIColor.black
        if let image = gen.generateCode("Test", machineReadableCodeObjectType: AVMetadataObject.ObjectType.interleaved2of5.rawValue, targetSize: CGSize(width: 300, height: 150)) {
            print(image)
            return image
        }

is my code, but i am getting it to work for qr, pdf14, and aztec codes. I'm also not getting it to work for many others. Has there been something done to those that don't use the abstract?

yeahdongcn commented 2 years ago

interleaved2of5 can only encode digits into barcode, so Test is not a valid input.