Sendable is a protocol in Swift that indicates a type is safe to share across concurrency domains like actors, tasks, and threads. When a type conforms to Sendable, the compiler verifies at compile time that passing it around can t introduce data races. Together with the @Sendable attribute for closures, it s one of the core building The post Sendable and @Sendable closures explained with code…
@MainActor is a global actor that performs its tasks on the main thread. You can use it to dispatch to the main thread by marking properties, methods, instances, or closures with the attribute. Instead of manually dispatching using DispatchQueue.main.async, you let the compiler enforce main thread execution for you. If you re new to Actors in The post @MainActor in Swift explained with code…
Xcode disk space can grow rapidly without you noticing. Especially these days, with multiple agents turning multiple worktrees into silent disk space occupiers. Where I used to only focus on deleting old Simulators every now and then, I m now also actively managing worktrees and derived data folders. There are great Mac apps and open-source projects The post How to free up Xcode disk space safely…
Testing iOS Time Zones is a typical validation path that s difficult without actually traveling yourself. You can apply all kinds of protocols and mock versions of your app, but having iOS act like it s actually traveling between time zones is a real challenge. Ideally, you d test apps like travel apps in such a way that The post How to Test iOS Apps in Different Time Zones on a Physical iPhone…
A user diagnostics report that helps you solve bugs and improve user support at the same time. I ve been writing apps since 2009, and the Diagnostics repository is an outcome of all that experience. Used by major apps from companies like WeTransfer, it has proven its value time after time. I ve seen consistent inefficiency at The post User Diagnostics Reports: Solving app bugs faster with AI…
Although the defer keyword was already introduced in Swift 2.0, it s still quite uncommon to use it in projects. Its usage can be hard to understand, but using it can improve your code a lot in some places. The most common use case seen around is opening and closing a context within a scope. Starting The post Defer in Swift explained with Code Examples appeared first on SwiftLee .
Memberwise initializers in Swift allow you to create struct instances without manually writing an initializer. The compiler examines the stored properties of your struct and automatically generates an initializer that accepts values for them. This feature is one of the reasons why structs are so lightweight to use in Swift. However, there are a few The post Memberwise Initializer in Swift…
Apple released Swift 6.4 during WWDC 2026, introducing a range of convenience improvements for both the general Swift language and the Concurrency APIs. While Swift is open-source, many of the changes might still have surprised you. At the same time, WWDC sessions do not cover all the new changes (if you have even had a The post Swift 6.4: What’s New in Concurrency appeared first on SwiftLee .
Xcode 27 launched during WWDC 2026 and includes Apple s SwiftUI Agent Skill for the first time. These skills work great for agentic development in Xcode, or when Using Xcode 27’s Agent Skills in Claude, Codex, and Cursor, any AI IDE. While we can use these skills and not look back, it s far more interesting to The post SwiftUI Best Practices, straight from Apple s Xcode 27 Agent Skill appeared…
Apple launched Xcode 27 during WWDC 26, introducing a bunch of agentic development improvements, including official agent skills. As you ve learned from my 9-Step Framework for Choosing the Right Agent Skill, it s important to pick skills from authoritative sources. Apple absolutely counts like one, of course! Official Agent Skills will impact how we build apps, whether The post Using Xcode 27 s…