Skip to content

shakurocom/GS1BarcodeParser

Repository files navigation

Shakuro GS1BarcodeParser

GS1BarcodeParser

Version Platform License MIT

A GS1BarcodeParser provides parsing of GS1 Barcodes. Library also provides general purpose validator for barcode's content.

Requirements

  • iOS 11.0+
  • Xcode 11.0+
  • Swift 5.0+

Installation

CocoaPods

To integrate GS1BarcodeParser into your Xcode project with CocoaPods, specify it in your Podfile:

pod 'Shakuro.GS1BarcodeParser'

Then, run the following command:

$ pod install

Manually

If you prefer not to use CocoaPods, you can integrate Shakuro.GS1BarcodeParser simply by copying it to your project.

Usage

Parser

let barcodeParser = GS1BarcodeParser()
barcodeParser.validation = .none // .soft, .hard
var barcodeElements: [GS1Barcode.Element] = []

let barcode: String = "8017123456789012345678\u{1D}8018123456789012345678\u{1D}80191234567890"
do {
    barcodeElements = try barcodeParser.parse(string: barcode).elements
} catch let error {
    // handle error
}

Have a look at the GS1BarcodeParser_Example

License

Shakuro.GS1BarcodeParser is released under the MIT license. See LICENSE for details.

Give it a try and reach us

Explore our expertise in Native Mobile Development and iOS Development.

If you need professional assistance with your mobile or web project, feel free to contact our team

Packages

No packages published

Contributors 2

  •  
  •  

Languages