What's New in Swift 6.3 and 6.4
Swift shipped twice this cycle: 6.3 in the spring and 6.4 alongside Xcode 27 at WWDC. Module selectors, async defer, and task cancellation shields are the three changes you'll actually use.
// 45 articles available
Swift shipped twice this cycle: 6.3 in the spring and 6.4 alongside Xcode 27 at WWDC. Module selectors, async defer, and task cancellation shields are the three changes you'll actually use.
Before WWDC 2026 I wrote down predictions and never hit publish. Four months later, with iOS 27 out and iPhone Duo days away, it's time to grade them against what Apple actually shipped.
Xcode 27 brings monthly subscriptions with a 12-month commitment, a reworked offer code redemption API, Bundles and Suites, and a unified App Review submission flow. Here is what each one changes for your code.
withCheckedContinuation turns a completion handler into async/await. Resume it exactly once; the checked version catches misuse the unsafe one ignores.
Swift 6's data-race safety is real, but it has blind spots. Here are the places the compiler can't see, and how to stop treating a clean build as proof your code is thread safe.
SE-0491 introduces the :: operator to disambiguate names that come from different modules. Here is when you actually need it and the gotchas worth knowing.
OSAllocatedUnfairLock is Swift's safe os_unfair_lock wrapper. Guard state with withLock, store the value inside the lock, and never forget to unlock.
print is fine for scratch work, but production apps need categories, levels, and privacy redaction. Here is how the Logger API from the os module gives you all of that without much ceremony.
Expose your app's features to Siri, Shortcuts, and Spotlight with App Intents, the Swift-native replacement for SiriKit in iOS 16 and later.
A practical guide to App Tracking Transparency in iOS, covering the Info.plist usage description, the ATTrackingManager API, authorization statuses, and when to actually prompt the user from SwiftUI.
Build a @DefaultEmpty property wrapper that automatically defaults missing or null array fields to an empty array when decoding JSON in Swift.
Swift 6.2 changes how async functions pick a thread by default. The new @concurrent attribute lets you explicitly opt into background execution when you actually need it.
URLProtocol is one of the oldest interception points in Foundation's networking stack. It lets you mock, log, or transform any URLSession request without touching the code that makes the request.
SE-0493 finally lets you write defer { await cleanup() } in async functions, without spawning a detached task or threading cleanup logic through every return path.
Swift 6.4's withTaskCancellationShield lets cleanup code run to completion even after a task has been cancelled, without spawning extra unstructured tasks.
Learn how to use Swift's RegexBuilder DSL to create readable, type-safe regular expressions with compile-time checking and strongly-typed captures.
Master Swift's TaskGroup for parallel async work with proper cancellation, error handling, and result collection. Learn common patterns for batch operations and concurrent pipelines.
Swift 6 introduces typed throws, letting you declare exactly which error types a function can throw. Learn how this improves API contracts and enables exhaustive error handling.
Understand the key difference between a UIView's frame and bounds properties, and when to use each in your iOS apps.
Swift Testing replaces XCTest with a cleaner macro-based API. Learn how to write tests with @Test, #expect, parameterized inputs, and traits in Xcode 16+.
Swift macros generate code at compile time, reducing boilerplate and catching errors early. Learn how to use built-in macros and understand how custom macros work.
A practical guide to Swift error handling covering throw/try/catch fundamentals, custom error types, Result, async error patterns, and typed throws introduced in Swift 6.
Use @AppStorage for small SwiftUI settings, UserDefaults outside views, and SwiftData for real models. Here is when each one fits, with code.
Implement in-app purchases and subscriptions with StoreKit 2: load products, handle transactions, check entitlements, and wire it all into SwiftUI.
Apple released Swift System Metrics 1.0, a package that collects process-level metrics like CPU time, memory usage, and file descriptors with a unified API across Linux and macOS.
A practical introduction to async/await in Swift, covering the fundamentals you need to write concurrent code that's both safe and readable.
Both async/await and Grand Central Dispatch solve concurrency problems, but they approach them differently. Here's how to choose between them.
Learn what the "some" keyword means in Swift, how opaque return types work, and why SwiftUI uses "some View" everywhere.
Learn how to use AppStore.ageRatingCode to read your app's current age rating and react to rating changes for parental consent compliance.
Learn how to use AlarmKit to schedule alarms and countdown timers that appear on the Lock Screen and Dynamic Island on iOS 26.
A practical guide to the different methods for adding single elements, multiple elements, and inserting at specific positions in Swift arrays.
Failable initializers offer a cleaner alternative to if-let statements when your SwiftUI views depend on optional data.
How to traverse the view controller hierarchy to find the currently visible view controller.
A refactoring mishap with arithmetic expressions led me down the rabbit hole of operator precedence differences between Swift and Objective-C. Here's what to watch for.
Actors provide compile-time safety for shared mutable state in Swift. Here's when to use them and how they compare to older approaches.
Swift offers actors, GCD, and locks for thread safety. Each solves the same problem differently. Here's how to choose.
Grand Central Dispatch remains a practical choice for thread safety in Swift, especially when you need synchronous access or are working with legacy code.
Locks offer the lowest overhead for thread synchronization in Swift. Here's when that matters and how to use them safely.
Learn how to access your app's App Delegate from anywhere in your Swift code, including from SwiftUI views.
Learn multiple approaches to replace characters and substrings in Swift strings, from simple replacements to pattern-based transformations.
Read an environment variable in Swift with ProcessInfo.processInfo.environment["KEY"]. Set values per scheme in Xcode or pass them to xcodebuild in CI.
How to generate random emoji characters in Swift using Unicode scalar ranges.
How to check available and total disk space on iOS devices using URL resource values.
Learn how to use kCFStringTransformToUnicodeName to get the system name for any emoji.
Learn how to prevent typing with your physical keyboard from dismissing the software keyboard when running your Swift app in the iOS simulator.