Swiftpack.co - Package - ApolloZhu/swift_qrcodejs

swift_qrcodejs

CocoaPods Version CocoaPods Compatible Platforms Swift Package Manager Compatible Carthage Compatible

Swift 4.2 MIT License Build Status Code Coverage Documentation

Cross-platform QRCode generator written in pure Swift, aiming to solve the awkward situation that there's no CIFilter for QRCode generation on Apple Watches.

Installation

Swift Package Manager
dependencies: [
    .package(url: "https://github.com/ApolloZhu/swift_qrcodejs.git", from: "1.1.2"),
]
CocoaPods
pod 'swift_qrcodejs'
Carthage
github "ApolloZhu/swift_qrcodejs" ~> 1.1.2
Manually

Copy all the .swift files from the Sources folder into your project.

Usage

import swift_qrcodejs

guard let qrCode = QRCode("Hello World!") else {
    fatalError("Failed to generate QRCode")
}
print(qrCode.toString(filledWith: "##", patchedWith: "  "))

For more, checkout the documentation.

Example Projects

License

MIT License. Modified based on qrcodejs. See LICENSE and each individual file header for more information.

Github

link
Stars: 14
Help us keep the lights on

Dependencies

Releases

1.1.2 - Sep 17, 2019

What's New

List all supported Swift versions in podspec by @chrisballinger (#6). Requires CocoaPods 1.7.5 or a newer version.

1.1.1 - Mar 30, 2019

swift-version and podspec remains to be Swift 4.2 to maximize compatibility

1.1.0 - Feb 20, 2019

What's New

Added option to choose text encoding for QRCode data by @joaodforce (#5)

Author's Perspective

Some other parts of this library still assumes UTF-8, so I'm expecting to see some test cases, crash reports, and/or other failures to come in, based on my limited knowledge of QRCode. Please open issues and/or pull requests when you encounter unexpected results.

1.0.1 - Oct 21, 2018

What's New

Fix hanging when string exceeds the maximum capable length to convert (#4) Fix crashes when UTF-8 length of string is in range [195, 220] (#4)

1.0.0 - Oct 21, 2018

What's New

See https://apollozhu.github.io/swift_qrcodejs/ for documentation and

image