A simple QR code reader for iOS built with Swift, based on Apple's AVFoundation framework.
QRCodeReader.swift is a Swift library for iOS that provides QR code and barcode scanning functionality using Apple's AVFoundation framework. It solves the problem of implementing camera-based code scanning by offering a pre-built view controller with customizable interface components, making it easier to integrate scanning capabilities into iOS apps.
iOS developers who need to add QR code or barcode scanning functionality to their applications without implementing low-level AVFoundation code or using heavier third-party libraries.
Developers choose QRCodeReader.swift because it's a native Swift solution that's lighter than alternatives like ZXing or ZBar, provides a ready-to-use interface with customization options, and integrates seamlessly with iOS development workflows through multiple dependency managers.
Simple QRCode reader in Swift
Provides a ready-to-use view controller with camera overlay, torch button, and camera switch, eliminating complex AVFoundation setup as shown in the screenshot and code examples.
Supports both delegate and closure patterns for scan results, allowing developers to choose their preferred integration method, as demonstrated in the usage snippet.
Through the QRCodeReaderDisplayable protocol, developers can fully customize the interface, including custom views and constraints, enabling branded UI designs.
Leverages AVFoundation to decode multiple machine-readable code types, such as QR, PDF417, and Aztec, by specifying metadataObjectTypes in the builder.
Lacks native SwiftUI support, requiring additional work like UIViewControllerRepresentable to integrate into modern iOS apps built with SwiftUI, which isn't mentioned in the README.
Customizing the interface requires implementing the QRCodeReaderDisplayable protocol, which can be more complex than simple property adjustments for minor UI tweaks.
Tied to AVFoundation and iOS, making it unsuitable for cross-platform development or server-side barcode processing, unlike some heavier alternatives like ZXing.
QRCodeReader.swift is an open-source alternative to the following products:
A better way to operate QRCode in Swift, support iOS, macOS, watchOS, tvOS, and/or visionOS.
Instagram-like photo browser and a camera feature with a few line of code in Swift.
⬆️ Media Capture in Swift
:mag_right: A simple and beautiful barcode scanner.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.