A GS1BarcodeParser
provides parsing of GS1 Barcodes.
Library also provides general purpose validator for barcode's content.
- iOS 11.0+
- Xcode 11.0+
- Swift 5.0+
To integrate GS1BarcodeParser into your Xcode project with CocoaPods, specify it in your Podfile
:
pod 'Shakuro.GS1BarcodeParser'
Then, run the following command:
$ pod install
If you prefer not to use CocoaPods, you can integrate Shakuro.GS1BarcodeParser simply by copying it to your project.
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
Shakuro.GS1BarcodeParser is released under the MIT license. See LICENSE for details.
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