Giter Club home page Giter Club logo

swiftgs1barcode's Introduction

SwiftGS1Barcode

A GS1 Barcode Library and Parser written in Swift

Language iOS GitHub license

Usage

Parsing is as simple as

let gs1Barcode = "01101234670417283002\u{1D}1721103110S123456"
let barcode = GS1Barcode(raw: gs1Barcode)

print(barcode.gtin)
print(barcode.amount)
print(barcode.expirationDate)
print(barcode.lotNumber)

Available Properties

Currently only the following properties are available and do get parsed

  • GTIN
  • GtinIndicatorDigit
  • lotNumber
  • expirationDate
  • serialNumber
  • amount

Other properties can be extended pretty easily. You can contribute yourself, or open an issue.

Installation

CocoaPods

You can install the library to you project using CocoaPods. Add the following code to your Podfile:

pod 'SwiftGS1Barcode'

Alternative you can also add the direct Github URL:

pod 'SwiftGS1Barcode', :git => 'https://github.com/xremix/SwiftGS1Barcode', :branch => 'master'

Manually

You can add the project as a git submodule. Simply drag the SwiftGS1Barcode.xcodeproj file into your Xcode project.

  • Don't forget to add the framework in your application target *

Deployment Steps

  • Run Unit Tests
  • Lint Podfile using pod lib lint
  • Update Version in Project Settings and Pod Specs
  • Push Code to Git
  • Create Release on Git
  • Push code to CocoaPods using pod trunk push SwiftGS1Barcode.podspec

Resources

A couple of resources, used for this project.

GS1 parsing

https://www.activebarcode.de/codes/ean128_ucc128_ai.html https://www.gs1.at/fileadmin/user_upload/Liste_GS1_Austria_Application_Identifier.pdf

CocoaPod

https://www.appcoda.com/cocoapods-making-guide/

swiftgs1barcode's People

Contributors

xremix avatar

Watchers

Carabineiro avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.