Swiftpack.co - Package - ApolloZhu/swift_qrcodejs


CocoaPods Version CocoaPods Compatible Platforms Swift Package Manager Compatible Carthage Compatible

Swift 5.0 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.


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

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


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


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


Stars: 17


Used By

Total: 0


swift_qrcodejs 1.1.3 - 2019-11-28 03:32:31

Update Swift version from 4.2 to 5.0 in config files. Nothing else changed.

swift_qrcodejs 1.1.2 - 2019-09-17 20:52:12

What's New

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

swift_qrcodejs 1.1.1 - Just Swift 5 - 2019-03-30 14:51:18

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

swift_qrcodejs 1.1.0 - What is UTF8? - 2019-02-20 23:39:35

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.

swift_qrcodejs 1.0.1 - Overflown? Not any more - 2018-10-21 20:01:30

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)

swift_qrcodejs 1.0.0 - Released! - 2018-10-21 06:00:37

What's New

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