Stewart Lynch

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
Fastlane alternative – CLI tools

Are you tired of Ruby and Fastlane installation issues? There's got to be a better way! Discover Codemagic open source CLI tools. It is not a drop-in replacement for all of what Fastlane does (screenshots for example), but we use it at Codemagic to build and publish iOS and Android apps, also versioning and device provisioning.

View on GitHub
© 2026 Mobile Signal. All rights reserved.
Made by
Stan
linkedin