Alok Singh, App Dev Notes
iOS app development articles by Alok Singh. Originals at bestlatestapps.com.
A Document Scanner in an Afternoon: VisionKit's Camera, Core Image Clean-Up and AirPrint
Originally published at https://bestlatestapps.com/blog/a-document-scanner-in-an-afternoon/ Apple's document camera on iOS 13+, a Vision rectangle-detection fallback for older devices, enhancing scans with Core Image, saving locally, sharing PNGs and printing Document scanning
Originally published at https://bestlatestapps.com/blog/a-document-scanner-in-an-afternoon/ Apple's document camera on iOS 13+, a Vision rectangle-detection fallback for older devices, enhancing scans with Core Image, saving locally, sharing PNGs and printing Document scanning used to be a serious computer-vision project: find the page's edges, correct the perspective, flatten the lighting, sharpen the text.
A Practical Guide to iOS Haptics: UIFeedbackGenerator, SwiftUI sensoryFeedback and Core Haptics with AHAP
Originally published at https://bestlatestapps.com/blog/a-practical-guide-to-ios-haptics/ The three layers of haptic APIs, when to use each, building custom patterns with intensity and sharpness, AHAP files, looping and speed control, and two deprecations
Originally published at https://bestlatestapps.com/blog/a-practical-guide-to-ios-haptics/ The three layers of haptic APIs, when to use each, building custom patterns with intensity and sharpness, AHAP files, looping and speed control, and two deprecations to know about in iOS 27 Haptics are the most under-designed part of most iOS apps. Developers add .impactOccurred() to
Animating Algorithms in SwiftUI: A Step-Recorder Pattern for Visualising Sorts, Searches and Graphs
Originally published at https://bestlatestapps.com/blog/animating-algorithms-in-swiftui/ Separate the algorithm from the animation, record every step as data, then play it back with play, pause, speed and scrubbing, accessibly When I was learning
Originally published at https://bestlatestapps.com/blog/animating-algorithms-in-swiftui/ Separate the algorithm from the animation, record every step as data, then play it back with play, pause, speed and scrubbing, accessibly When I was learning data structures, the textbook diagrams were always a frame or two short. You'd see the array before the merge and
Building a Chromatic Guitar Tuner on iOS: Real-Time Pitch Detection with AVAudioEngine and Accelerate
Originally published at https://bestlatestapps.com/blog/building-a-chromatic-guitar-tuner-on-ios/ From microphone samples to A2, +3 cents: session setup, an input tap, autocorrelation with vDSP, note maths, smoothing and tuning presets A tuner is the most
Originally published at https://bestlatestapps.com/blog/building-a-chromatic-guitar-tuner-on-ios/ From microphone samples to A2, +3 cents: session setup, an input tap, autocorrelation with vDSP, note maths, smoothing and tuning presets A tuner is the most honest app you can build. There's no design trick that hides a wrong answer: the guitarist plucks the low E,
Building a Hashtag Copier for iOS: Clean Tags, Editable Lists, Clipboard Privacy and Instagram's New Five-Hashtag Limit
Originally published at https://bestlatestapps.com/blog/building-a-hashtag-copier-for-ios/ How to normalise tags so they actually work, model bundled categories with user edits, copy to the pasteboard without tripping privacy prompts, and redesign a copy
Originally published at https://bestlatestapps.com/blog/building-a-hashtag-copier-for-ios/ How to normalise tags so they actually work, model bundled categories with user edits, copy to the pasteboard without tripping privacy prompts, and redesign a copy 30 tags app now that Instagram allows five Hashtags Creator was one of my first App Store apps. The idea
Building a Live Temple Darshan App for iOS: HLS Streaming, Picture-in-Picture, Time-Zone-Correct Aarti Reminders and Notification Actions
Originally published at https://bestlatestapps.com/blog/building-a-live-temple-darshan-app-for-ios/ Playing live and recorded video with AVPlayer, keeping darshan going in picture-in-picture, falling back gracefully when a stream is down, scheduling aarti reminders in the temple's
Originally published at https://bestlatestapps.com/blog/building-a-live-temple-darshan-app-for-ios/ Playing live and recorded video with AVPlayer, keeping darshan going in picture-in-picture, falling back gracefully when a stream is down, scheduling aarti reminders in the temple's time zone for devotees anywhere in the world, Watch Now and Remind Later actions, a next-aarti widget, and opening a
Building a Live iOS Component Catalogue: UIKit and SwiftUI Side by Side, Real Demos, and Code Snippets That Don't Rot
Originally published at https://bestlatestapps.com/blog/building-a-live-ios-component-catalogue/ One registry for every component, hosting UIKit inside SwiftUI with UIViewRepresentable, wrapping the system pickers, comparing UIKit and SwiftUI versions on one screen, tag filters, search,
Originally published at https://bestlatestapps.com/blog/building-a-live-ios-component-catalogue/ One registry for every component, hosting UIKit inside SwiftUI with UIViewRepresentable, wrapping the system pickers, comparing UIKit and SwiftUI versions on one screen, tag filters, search, favourites and recently viewed, and keeping copyable snippets honest Every iOS developer has done this: you need a segmented control,
Building a Low-Latency Virtual Piano and Drum Kit on iOS with AVAudioEngine
Originally published at https://bestlatestapps.com/blog/building-a-low-latency-virtual-piano-and-drum-kit-on-ios-with-avaudioe/ Samplers for pitched instruments, a player-node pool for drums, a multi-touch keyboard that handles chords and glissandos, and note names for beginners The test for a
Originally published at https://bestlatestapps.com/blog/building-a-low-latency-virtual-piano-and-drum-kit-on-ios-with-avaudioe/ Samplers for pitched instruments, a player-node pool for drums, a multi-touch keyboard that handles chords and glissandos, and note names for beginners The test for a virtual instrument is brutal and immediate: tap a key, and the sound has to arrive with your finger, not after
Building a Real-Time Mic-to-Speaker App on iOS with AVAudioEngine
Originally published at https://bestlatestapps.com/blog/building-a-real-time-mic-to-speaker-app-on-ios-with-avaudioengine/ Live audio passthrough in Swift: session setup, permissions, feedback, interruptions and route changes, from shipping an app that does exactly this Most audio tutorials on iOS
Originally published at https://bestlatestapps.com/blog/building-a-real-time-mic-to-speaker-app-on-ios-with-avaudioengine/ Live audio passthrough in Swift: session setup, permissions, feedback, interruptions and route changes, from shipping an app that does exactly this Most audio tutorials on iOS cover one of two things: playing a file, or recording one. Very few cover the strange in-between case where the
Building a Tap-to-Match Marble Game with SpriteKit and SwiftUI: Physics, Cluster Matching, Timers, Lives and Power-Ups
Originally published at https://bestlatestapps.com/blog/building-a-tap-to-match-marble-game-with-spritekit-and-swiftui/ A complete walkthrough of the game loop: marbles that settle under real physics, finding touching same-colour clusters, a pause-safe countdown, lives and levels, Lightning, Heart and
Originally published at https://bestlatestapps.com/blog/building-a-tap-to-match-marble-game-with-spritekit-and-swiftui/ A complete walkthrough of the game loop: marbles that settle under real physics, finding touching same-colour clusters, a pause-safe countdown, lives and levels, Lightning, Heart and Bomb power-ups, and particle effects, all hosted in SwiftUI with SpriteView Every game developer has a small game that taught
Building an AdMob Earnings Dashboard for iOS: Google OAuth with PKCE, the AdMob Reporting API, Pacific-Time 'Today', and Offline Caching
Originally published at https://bestlatestapps.com/blog/building-an-admob-earnings-dashboard-for-ios/ Signing in with ASWebAuthenticationSession and PKCE, storing tokens safely in the Keychain, calling networkReport:generate, decoding a streamed report, turning micros into money, why today is a
Originally published at https://bestlatestapps.com/blog/building-an-admob-earnings-dashboard-for-ios/ Signing in with ASWebAuthenticationSession and PKCE, storing tokens safely in the Keychain, calling networkReport:generate, decoding a streamed report, turning micros into money, why today is a Los Angeles day, live earning rates, and caching for offline use If you have apps with ads, you know the
Building an Offline Quotes App in SwiftUI: a 50,000-Quote Library, a Daily Quote Without a Server, Honest Streaks and Share-as-Image
Originally published at https://bestlatestapps.com/blog/building-an-offline-quotes-app-in-swiftui/ Bundling and importing a large library into SwiftData, picking a quote of the day deterministically, search with recent queries, collections, time-zone-safe streaks, rendering shareable quote cards
Originally published at https://bestlatestapps.com/blog/building-an-offline-quotes-app-in-swiftui/ Bundling and importing a large library into SwiftData, picking a quote of the day deterministically, search with recent queries, collections, time-zone-safe streaks, rendering shareable quote cards with ImageRenderer, and Light/Dark/Auto themes A quotes app looks like the simplest thing in the App Store: a list of
Building an Offline eBook Reader for iOS: Downloads, Typography Settings, Reading Progress That Survives Font Changes, and Highlights in the iOS 26 Text APIs
Originally published at https://bestlatestapps.com/blog/building-an-offline-ebook-reader-for-ios/ Downloading and storing public-domain books, previewing before you download, a UITextView-based reader with font, line height, margin and theme settings, saving your place as a character
Originally published at https://bestlatestapps.com/blog/building-an-offline-ebook-reader-for-ios/ Downloading and storing public-domain books, previewing before you download, a UITextView-based reader with font, line height, margin and theme settings, saving your place as a character offset instead of a page number, bookmarks and highlights (including iOS 26's multi-range selection), reading time estimates and reading statistics
Building an Offline-First Bible Reader on iOS: Bundled SQLite, Full-Text Search and iCloud-Synced Notes
Originally published at https://bestlatestapps.com/blog/building-an-offline-first-bible-reader-on-ios/ How I'd structure a scripture app that works on a plane: a read-only text database, fast search, user data that follows you between devices, read-aloud and
Originally published at https://bestlatestapps.com/blog/building-an-offline-first-bible-reader-on-ios/ How I'd structure a scripture app that works on a plane: a read-only text database, fast search, user data that follows you between devices, read-aloud and a verse-of-the-day widget The first app I ever published under my App Store developer name was a Bible reader. It
Convert-As-You-Type Currency Conversion in Swift: Decimal Maths, Cached Rates and Locale-Aware Formatting
Originally published at https://bestlatestapps.com/blog/convert-as-you-type-currency-conversion-in-swift/ Why Double is the wrong type for money, how to derive any cross rate from one base, keeping rates fresh without a refresh button, and formatting
Originally published at https://bestlatestapps.com/blog/convert-as-you-type-currency-conversion-in-swift/ Why Double is the wrong type for money, how to derive any cross rate from one base, keeping rates fresh without a refresh button, and formatting 150+ currencies correctly A currency converter is used at the worst possible moments: at a market stall abroad, at a
Drag-to-Connect and Game Center Leaderboards in a SwiftUI Puzzle Game, Updated for iOS 26
Originally published at https://bestlatestapps.com/blog/drag-to-connect-and-game-center-leaderboards-in-a-swiftui-puzzle-game/ A dot-matching board drawn with Canvas and TimelineView, drag gestures that chain same-colour dots, speed-based scoring and rising difficulty, pause and resume, and modern Game Center:
Originally published at https://bestlatestapps.com/blog/drag-to-connect-and-game-center-leaderboards-in-a-swiftui-puzzle-game/ A dot-matching board drawn with Canvas and TimelineView, drag gestures that chain same-colour dots, speed-based scoring and rising difficulty, pause and resume, and modern Game Center: authentication, submitting scores, the access point, and what iOS 26 deprecates Speck Match is a puzzle game about speed. You
From Barcode to PDF: Building a Private, Offline Medication Tracker with VisionKit, WidgetKit and PDFKit
Originally published at https://bestlatestapps.com/blog/from-barcode-to-pdf/ Scanning a box to add a medication, a SwiftData model shared with widgets, adherence statistics, a doctor-ready PDF report, and CSV/JSON export that keeps everything on
Originally published at https://bestlatestapps.com/blog/from-barcode-to-pdf/ Scanning a box to add a medication, a SwiftData model shared with widgets, adherence statistics, a doctor-ready PDF report, and CSV/JSON export that keeps everything on the device I have two medication apps on the App Store. The first, Daily Pills | Reminder, does one thing:
Medication Reminders That Actually Fire: Local Notifications, the 64-Notification Limit and Supply Math
Originally published at https://bestlatestapps.com/blog/medication-reminders-that-actually-fire/ Repeating calendar triggers, a notification budget, Taken and Snooze actions, run-out dates and on-device privacy, from building a pill reminder app Most apps can afford a
Originally published at https://bestlatestapps.com/blog/medication-reminders-that-actually-fire/ Repeating calendar triggers, a notification budget, Taken and Snooze actions, run-out dates and on-device privacy, from building a pill reminder app Most apps can afford a missed notification. A medication reminder can't. If the 9 p.m. reminder silently doesn't arrive, someone misses a dose, and they
Shipping a 4K Wallpaper App Without Running Out of Memory: ImageIO Downsampling, Core Image Blur and Add-Only Photos Access
Originally published at https://bestlatestapps.com/blog/shipping-a-4k-wallpaper-app-without-running-out-of-memory/ Decoded-image maths, thumbnails that don't decode the full file, a blur editor that keeps edges clean, saving with the minimum permission, and why your app can't
Originally published at https://bestlatestapps.com/blog/shipping-a-4k-wallpaper-app-without-running-out-of-memory/ Decoded-image maths, thumbnails that don't decode the full file, a blur editor that keeps edges clean, saving with the minimum permission, and why your app can't set the wallpaper itself A wallpaper app looks like the simplest kind of app there is: a grid of pictures,
Stop Hand-Rolling Unit Conversions: Foundation's Measurement, Dimension and MeasurementFormatter in Practice
Originally published at https://bestlatestapps.com/blog/stop-hand-rolling-unit-conversions/ Built-in units, custom dimensions, non-linear converters, locale-aware input and output, and the temperature trap that catches everyone Every unit converter I've seen in a code review
Originally published at https://bestlatestapps.com/blog/stop-hand-rolling-unit-conversions/ Built-in units, custom dimensions, non-linear converters, locale-aware input and output, and the temperature trap that catches everyone Every unit converter I've seen in a code review starts the same way: a dictionary of conversion factors, a switch on the category and a special case for temperature