Sync test target deployment target
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.
More details in the Official Guide, but in general:
File
Swift Packages
Add Package Dependency
QRCodeSwift
Package.swift
dependencies: [ .package(url: "https://github.com/ApolloZhu/swift_qrcodejs.git", from: "2.2.2"), ]
… then add QRCodeSwift module/target from package swift_qrcodejs as your dependency.
swift_qrcodejs
pod 'swift_qrcodejs', '~> 2.2.2'
I assume you know what you are doing (because I don’t), but you probably need something like this:
github "ApolloZhu/swift_qrcodejs" ~> 2.2.2
Note that Carthage doesn’t work with Xcode 12 (but here’s a workaround).
Add all the .swift files from the Sources folder into your project.
.swift
Sources
import QRCodeSwift guard let qrCode = try? QRCode("Hello World!") else { fatalError("Failed to generate QRCode") } print(qrCode.toString(filledWith: "##", patchedWith: " "))
For more, checkout the documentation.
MIT License. Modified based on qrcodejs. See LICENSE and each individual file header for more information.
©Copyright 2023 CCF 开源发展委员会 Powered by Trustie& IntelliDE 京ICP备13000930号
QRCodeSwift (swift_qrcodejs)
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
with Xcode
More details in the Official Guide, but in general:
File
>Swift Packages
>Add Package Dependency
QRCodeSwift
library and add it to your app target.with
Package.swift
… then add
QRCodeSwift
module/target from packageswift_qrcodejs
as your dependency.CocoaPods
Carthage
I assume you know what you are doing (because I don’t), but you probably need something like this:
Note that Carthage doesn’t work with Xcode 12 (but here’s a workaround).
Manually
Add all the
.swift
files from theSources
folder into your project.Usage
For more, checkout the documentation.
Example Projects
License
MIT License. Modified based on qrcodejs. See LICENSE and each individual file header for more information.