In iOS 13, we gained the ability to easily send and receive data using web sockets through URLSession. With async/await, we gained the ability to fetch data from servers using the await keyword and we can iterate over asynchronous sequences using async for loops. We can even read data from a URL one line at […]
Read post
Subscribe to my newsletter and never miss a post
Recent articles
Jump to a random postIn an earlier post, I wrote about different ways that you can bridge your existing asynchronous code over to Swift’s new Concurrency system that leverages async / await. The mechanisms shown there work great for code where your code produces a single result that can be modeled as a single value. Since writing this post […]
Read postSometimes in SwiftUI apps I’ll find that I have a model with an optional value that I’d like to pass to a view that requires a non optional value. This is especially the case when you’re using Core Data in your SwiftUI apps and use auto-generated models. These models will usually include optional values for […]
Read postIf you want to make sure that your code adopts Swift concurrency as correctly as possible in Swift 5.x, it’s a good idea to enable the Strict Concurrency Checking (SWIFT_STRICT_CONCURRENCY) flag in your project. To do this, select your project’s target and navigate to the Build Settings tab. Make sure you select All from the […]
Read postSendability is an important feature of Swift Concurrency. It’s how the compiler determines whether code can safely be accessed from multiple concurrency contexts. In this post you’ll learn everything you need to know about why state sometimes needs to be Sendable.
Read postXcode 14 “Publishing changes from within view updates is not allowed, this will cause undefined behavior”
Updated on: April 23, 2024UPDATE FOR XCODE 14.1: This issue appears to have been partially fixed in Xcode 14.1. Some occurences of the warning are fixed, others aren’t. In this post I’m collecting situations me and others run into and track whether they are fixed or not. If you have another sample that you think is similar, please send […]
Read postSwift 5.7 introduces many new features that involve generics and protocols. In this post, we’re going to explore an extremely powerful new features that’s called "primary associated types". By the end of this post you will know and understand what primary associated types are, and why I think they are extremely important and powerful to […]
Read postProtocols are an extremely important part in the Swift language, and in recent updates we’ve received some new capabilities around protocol and generics that allow us to be much more intentional about how we use protocols in our code. This is done through the any and some keywords. In this post, you will learn everything […]
Read postThis post is up to date for Xcode 15 and newer. It supersedes a version of this post that you can find here On iOS 15, Apple granted developers the ability to present partially visible bottom sheets using a component called UISheetPresentationController. Originally, we had to resort to using a UIHostingController to bring this component […]
Read postWorking with dates isn’t easy. And showing them to your users in the correct locale hasn’t always been easy either. With iOS 15, Apple introduced a new way to convert Date objects from and to String. This new way comes in the form of the new Formatter api that replaces DateFormatter. As any seasoned iOS […]
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