Hi folks,
In this issue, we dive into ways to make our apps faster and more accessible, as we all strive for that perfect user experience. We explore optimizing network requests using AI agents and boosting SwiftUI ScrollView performance to
keep things smooth in our apps. We also look at implementing on-device OCR with Apple’s Vision framework and extending our macOS apps with system-wide services. Plus, we delve into the nuances of dependency injection with FactoryKit and share a cool project on building a custom static site builder. Finally, we’ll check out Apple’s latest guidance on Accessibility Nutrition Labels to ensure our apps are inclusive for everyone.
We hope you like it!
Articles
AI/ML
Network Requests Optimization using Xcode’s Simulator & Agents
This article explores how to optimize network requests using Xcode’s Simulator and AI agents. It highlights the use of RocketSim for continuous network monitoring and demonstrates how to export structured data to AI tools like Cursor for performance analysis. By combining real networking data with code, developers can more effectively identify redundant calls and caching opportunities.
UI / UX
How I built an on-device plate OCR scanner for iPhone with Apple Vision
The author describes the process of building a stable, on-device license plate OCR scanner using Apple’s Vision framework. He emphasizes the importance of heuristics over the raw OCR engine, such as using Regions of Interest (ROI), temporal smoothing, and confidence voting. These techniques collectively transform a basic prototype into a reliable live camera tool.
Defaults and overrides for Factory contexts with FactoryKit
This article delves into the subtleties of dependency injection using FactoryKit in SwiftUI. It explains how factory resolution and global state can lead to unexpected behavior when overriding factories in tests. The author provides solutions using .once() and AutoRegistering to ensure correct mock implementations are used.
ScrollView Performance in SwiftUI
This guide provides practical tips for improving the performance of ScrollViews in SwiftUI, which lack built-in view recycling. It recommends using LazyVStack, LazyHStack, and lazy grids to load views on demand. Additionally, the author suggests moving heavy computations out of the view body and using AsyncImage for remote content.
Building my Own Static Website Builder
The author shares the journey of creating CTSiteBuilder, a macOS app used as a CMS to generate a static website. The app leverages SQLiteData for persistence and CloudKit for synchronization, allowing content to be managed in SwiftUI and exported as HTML. It includes features like Markdown support and rsync deployment for a streamlined workflow.
Provide macOS system-wide services from your app
This post explains how to implement macOS system-wide services that extend an app’s functionality to the entire OS. The author demonstrates this through a URL encoding/decoding utility, detailing the service provider class, Info.plist configuration, and registration process. It provides a practical guide for making an app’s features accessible via the system’s Services menu.
Memory Leaks in Swift: The Silent Killer of iOS Apps
A guide for the newbies, a reminder for the rest. It looks at memory leaks in Swift explaining how they occur when strong reference cycles prevent ARC from deallocating objects. These leaks usually lead to performance degradation and increased memory usage over time. Common causes include closures, delegates, timers, and async tasks, all of which require explicit ownership management using weak or unowned references.
Video
Prepare your app for Accessibility Nutrition Labels
This Apple Tech Talk focuses on preparing apps for Accessibility Nutrition Labels by supporting essential accessibility features. It covers configuring accessibility labels and traits for custom controls, supporting Dynamic Type for larger text, and making designs inclusive via Dark Mode and high contrast. The video provides concrete code examples for both SwiftUI and UIKit to enhance user interaction.