iOS Dev Weekly Digest | Latest Articles from the Community, Week #42
A curated collection of articles, videos, and links from top iOS blogs and YouTube channels, bringing you the latest insights and trends in iOS development.
Security-scoped bookmarks for URL access
Author: Antoine van der Lee
Content type: Article
Security-scoped bookmarks allow you to store access to a given user-selected URL. They are commonly used on macOS to store access information for a user-selected directory. Restoring the security-scoped bookmark data allows you to regain access to a folder previously selected by the user.
I’ve been using this technique for years and recently discovered a major bug in macOS Sequoia that’s been fixed in macOS 15.1. While it shows the vulnerability of this API, I still want to highlight the added value when working in a sandboxed environment.
Dependency Injection for Swift Developers
Author: Donny Wals
Content type: Video
Welcome back to the channel! In today’s video, we dive deep into the concept of Dependency Injection—a fundamental yet often misunderstood topic. You’ve probably been using dependency injection without even realizing it! Whether you’re creating objects with initializers or leveraging more advanced patterns like service locators, this video will guide you through the pros and cons of each approach. We’ll break down two popular types of dependency injection: 1. Initializer Injection – Why it’s great for compiler guidance but can get cumbersome in large apps. 2. Service Locator Pattern – How it simplifies dependencies, but with risks like hidden dependencies and potential crashes. You’ll learn how to use both methods in your Swift apps, including when and why to choose one over the other. Stick around to see real-world examples, and I’ll share my personal preference!
How to listen for property changes in an @Observable class using AsyncStreams
Author: Pol.
Content type: Article
Before the introduction of @Observable
in WWDC23, the only way to make a class’ property observable to SwiftUI was to use the @Published
property wrapper and make the class conform to the ObservableObject
protocol.
This approach would allow you to observe the class in SwiftUI using the @ObservedObject
or StateObject
property wrappers and any @Published
property would cause the view to update when it changed. Futhermore, all @Published
properties could be converted to Binding
s by using the $
prefix, much like a @State
property.
How to write a poker bot in SwiftUI
Author: David Seek
Content type: Article
Building a Poker Bot with SwiftUI: A Step-by-Step Guide - Venture into the realm of automated gaming by learning how to create a poker bot using SwiftUI. This comprehensive tutorial takes you through the coding strategies, logic implementation, and UI design needed to develop a competitive poker bot. Ideal for developers interested in gaming automation and SwiftUI advancements.
SwiftData Updates Part 2: Dynamic Sorts and filters with Predicate expressions
Author: Stewart Lynch
Content type: Video
This is the second video in a two part series where I explore new features introduced for SwiftData in iOS18. , In the first video in this series, we created a new PreviewModifer that allows us to import data from a JSON file to populate an in memory container that we can use in all of our previews.. In this video we will build dynamic sorting and search capabilities of the app and I will introduce you to the new Expression macro that we can use to create complex and compound Predicates for our swiftData models.
Reinventing Core Data Development with SwiftData Principles
Author: Fatbobman
Content type: Article
In modern application development, an efficient persistence framework is crucial. The emergence of SwiftData once caught the eyes of many Core Data developers, who anticipated the advent of a new era integrating modern programming concepts. This article will explore how to apply SwiftData’s way of thinking within Core Data, focusing on data modeling and concurrent programming.
How to get started with Swift Testing
Author: Vincent Pradeilles
Content type: Video
What is dependency injection in Swift?
Author: Donny Wals
Content type: Article
Code has dependencies. It’s something that I consider universally true in one way or another. Sometimes these dependencies are third party dependencies while other times you’ll have objects that depend on other objects or functionality to function. Even when you write a function that should be called with a simple input like a number, that’s a dependency.
Quick Hacks: Migrating XCTest to Swift Testing
Author: JACOB BARTLETT
Content type: Article
Swift Testing, introduced with Xcode 16, was one of the neatest additions to our iOS engineering toolkit in a long time.
Building on similar foundations to SwiftData the year before, it utilised macros to offer clean, flexible, expressive APIs for our tests.
Applying visual effects combined with scrolling in SwiftUI
Author: Antonella Giugliano
Content type: Article
Visual effects are powerful tools used for improving the aesthetics and usability of applications. Their usage is crucial when it comes to creating engaging and visually appealing interfaces while keeping them dynamic and responsive to interactions, ensuring both clarity and accessibility.
So how does this whole @preconcurrency thing work?
Author: massicotte.org
Content type: Article
I consistently find the @preconcurrency
attribute to be confusing. But, I’m tired of that. Let’s just, once and for all, get a better handle how to use this thing.
One Attribute, Many Purposes
Remember, Swift concurrency is all about the type system. This means that definitions are hugely important to how things function. The @preconcurrency
attribute alters how definitions are interpreted by the compiler. In general, it relaxes some rules that might otherwise make a definition difficult or even impossible to use.
It has three distinct uses. And while they all apply to definitions, the details are quite different. We’ll cover them all, in increasing order of complexity.
Swift 6 Concurrency (Part 1)
Author: objc
Content type: Article + Video
In our workshops, there are a few specific links we always want to share with our students, and today we'd like to build a tiny browser that lets us bookmark and maybe even crawl these sites, and enable both a full-text search and a visual way of searching through them. We want to take a snapshot of a webpage and store it, so that we can very quickly navigate to the link when people ask a question about the page's topic.
MV pattern in SwiftUI
Author: Aleksa Simic
Content type: Article
For the past couple of months, there has been a big hype amongst the iOS community about the new MV (or how some people call it: State) pattern that should replace the MVVM in SwiftUI applications. Why? There are a couple of different reasons people advocating for MV say it's better than MVVM, but here are the two that are mentioned the most times:
SwiftUI views are already MVVM
MVVM with SwiftUI is over engineering
iOS Dev Tools: Hummingbird, Apollo iOS, MBProgressHUD
Author: IOS DEV TOOLS
Content type: Article
Downloading files from URLs in Swift [SwiftUI Architecture]
Author: Matteo Manferdini
Content type: Article
The Hidden Cost of AI-Generated Unit Tests: Sacrificing Domain Knowledge
Author: Mohammad Azam
Content type: Article
Swift 6 Unleashed in Xcode 16: Enabling New Features and Strict Concurrenc
Author: Muralidharan Kathiresan
Content type: Article
#21 - User Interface Layouts
Author: ARTJOMS VORONA
Content type: Article
NSCoding vs Codable for data persistence??
Author: ALEX BUSH
Content type: Article