https://github.com/shakurocom/gs1barcodeparser
https://github.com/shakurocom/gs1barcodeparser
barcode barcode-parser barcode-recognizer gs1 ios swift xcode
Last synced: 8 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/shakurocom/gs1barcodeparser
- Owner: shakurocom
- License: mit
- Created: 2022-09-08T19:16:51.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2023-01-25T07:28:36.000Z (over 3 years ago)
- Last Synced: 2024-03-14T19:05:02.188Z (over 2 years ago)
- Topics: barcode, barcode-parser, barcode-recognizer, gs1, ios, swift, xcode
- Language: Swift
- Homepage:
- Size: 643 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README

# GS1BarcodeParser



- [Requirements](#requirements)
- [Installation](#installation)
- [Usage](#usage)
- [License](#license)
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`:
```ruby
pod 'Shakuro.GS1BarcodeParser'
```
Then, run the following command:
```bash
$ 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](https://github.com/shakurocom/GS1BarcodeParser/tree/master/GS1BarcodeParser_Example)
## License
Shakuro.GS1BarcodeParser is released under the MIT license. [See LICENSE](https://github.com/shakurocom/GS1BarcodeParser/blob/master/LICENSE.md) 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