Swift Package Index


A Swift framework for generating QR codes


  • The latest stable release is 0.4.1. Released 3 years ago.
  • The last commit to master was 3 years ago.

Swift Version Compatibility

  • 0.4.1 and master
    5.3
    5.2
    5.1
    5.0
    4.2
Full build results

Platform Compatibility

  • 0.4.1 and master
    iOS
    macOS(Intel)
    macOS(ARM)
    Linux
    tvOS
    watchOS
Full build results

QRSwift

Build Status Swift Version spm compatible Carthage compatible CocoaPods compatible Platform

QRSwift is a Swift framework for generating QR codes.

Installation

Swift Package Manager

Add .Package(url: "https://github.com/chrisamanse/QRSwift.git", majorVersion: 0) in the dependencies of your Package or Target, then run swift package update.

CocoaPods

Add pod 'QRSwift' to your target in your Podfile, then run pod install.

Carthage

Add this to your Cartfile:

github "chrisamanse/QRSwift"

Then run:

$ carthage update

Usage


let message = "Hello, World!"

// Encode message as Data
let data = message.data(using: .utf8)!

// Create a QR code generator instance
var generator = QRCodeGenerator()
generator.correctionLevel = .M

// Generate image
let image = generator.image(with: data, outputImageSize: CGSize(width: 128, height: 128))

License

Copyright (c) 2017 Joe Christopher Paul Amanse

This software is distributed under the MIT License.