Stewart Lynch iOS Articles & Videos

Curated content from
Stewart Lynch
Dedicated to iOS development using Swift.

Latest resources

Generating a QR Code from a String in SwiftUI

May 8, 2026

The article explains how to generate QR codes from text using Core Image's built in qrCodeGenerator filter. It presents QRCodeGenerator as an enum with static functions (acting as a namespace, not an initializable type). The implementation uses CIFilter.qrCodeGenerator(), sets the message as Data from the input string, applies error correction level M, scales the output image (typically by 12x because the raw output is tiny), converts to CGImage then UIImage then SwiftUI Image. The article also covers using .interpolation(.none) to keep edges crisp, separating user input from committed QR code text with two @State properties, and handling failure cases.

About
Stewart Lynch

Dedicated to iOS development using Swift.

In partnership with
Appcircle
Appcircle
Ship iOS releases without the chaos
See how Appcircle simplifies App Store publishing, from customizing release flows to re-signing builds and tracking every deployment in one place.
Watch on YouTube
© 2026 US iOS Employers. All rights reserved.
Made by
Stan
linkedin