Actor isolated protocol conformances are a super useful way to ensure that certain protocol conformances are only available on a specific actor. That said, with this feature you’ll open yourself up to some brand new compiler errors that I’ll explain in this post.
Read post
Subscribe to my newsletter and never miss a post
Learn more about Actors
Once you start using Swift Concurrency, actors will essentially become your standard choice for protecting mutable state. However, introducing actors also tends to introduce more concurrency than you intended which can lead to more complex code, and a much harder time transitioning to Swift 6 in the long run. When you interact with state that’s […]
Read postDispatching to the Main thread with MainActor in Swift
Published on: April 23, 2024Swift 5.5 introduced loads of new concurrency related features. One of these features is the MainActor annotation that we can apply to classes, functions, and properties. In this post you’ll learn several techniques that you can use to dispatch your code to the main thread from within Swift Concurrency’s tasks or by applying the main […]
Read postWhen you start learning about actors in Swift, you’ll find that explanations will always contain something along the lines of “Actors protect shared mutable state by making sure the actor only does one thing at a time”. As a single sentence summary of actors, this is great but it misses an important nuance. While it’s […]
Read postAsync/await will be the defacto way of doing asynchronous programming on iOS 15 and above. I’ve already written quite a bit about the new Swift Concurrency features, and there’s still plenty to write about. In this post, I’m going to take a look at building an asynchronous image loader that has support for caching. SwiftUI […]
Read postOne of my favorite concurrency problems to solve is building concurrency-proof token refresh flows. Refreshing authentication tokens is something that a lot of us deal with regularly, and doing it correctly can be a pretty challenging task. Especially when you want to make sure you only issue a single token refresh request even if multiple […]
Read postWe all know that async / await was one of this year’s big announcements WWDC. It completely changes the way we interact with concurrent code. Instead of using completion handlers, we can await results in a non-blocking way. More importantly, with the new Swift Concurrency features, our Swift code is much safer and consistent than […]
Read postData races make concurrency hard. They occur when two threads access the same data and at least one of them is a write. It’s trivial to write a data race, but it’s really hard to debug. Data races aren’t always clear, aren’t always reproducible, and might not always manifest in the same way. Shared mutable […]
Read postExpand your learning with my books

Learn everything you need to know about Core Data and how you can use it in your projects with Practical Core Data. It contains:
- Twelve chapters worth of content.
- Sample projects for both SwiftUI and UIKit.
- Free updates for future iOS versions.
The book is available as a digital download for just $39.99!
Learn more