/swift_qrcodejs

Cross-platform/appleOS SIMPLE QRCode generator for swift, without using CIFilter

Primary LanguageSwiftMIT LicenseMIT

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.1"),
]
CocoaPods
pod 'swift_qrcodejs'
Carthage
github "ApolloZhu/swift_qrcodejs" ~> 1.1.1
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.