Skip to content

UPC-A support #29

@yporubov

Description

@yporubov

Thank you so much for the barcode generator.

From "AVMetadataObjectTypeEAN13Code" description: AVMetadataMachineReadableCodeObject instances generated from EAN-13 (including UPC-A) codes return this identifier as the type.

The barcode does have length 12 digits, like 123456789012. EAN-13 barcode does have 13 digits
isContentsValid method returns NO because contents.length == self.length is not TRUE. (12 != 13)
As workaround I added one zero before barcode (0123456789012) and it works for me.
[CodeGen genCodeWithContents:@"0123456789012" machineReadableCodeObjectType:objectType]

But could you please add zero inside API ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions