In my previous article, I discussed the current reality of Core Data in today's projects: it hasn't disappeared, and it still has unique value, but the disconnect between it and modern Swift projects is becoming increasingly apparent. In this article, I will introduce my experimental project Core Data Evolution, exploring whether we can make Core Data continue to exist in modern Swift projects in a more natural way?
Why NSManagedObjectContext no longer triggers concurrency errors in Swift 6.2? The real change lies in Core Data’s SDK import semantics, not the compiler itself. NSManagedObjectContext is now marked with NS_SWIFT_SENDABLE and NS_SWIFT_NONISOLATED in Xcode 26
While Swift 6.2's Default Actor Isolation simplifies concurrency, the compiler sometimes fails to infer closure execution contexts, leading to unexpected errors. This article explores a practical solution using @isolated(any) and the #isolation macro to achieve function isolation inheritance. Learn how to eliminate redundant `@MainActor` annotations while ensuring strict compile-time safety.
Use MainActor.assumeIsolated in a synchronous context to create closure safely on the main thread and return Sendable types, achieving full compatibility without warnings or errors.
Explore how Swift 6 uses Sendable, @Sendable, sending, and nonsending to enforce concurrency safety, ensure thread-safe data transfer, and prevent race conditions.
Swift 6.2’s Default Actor Isolation reduces boilerplate by inferring isolation for unmarked code, but brings new actor-boundary rules and macro challenges
Discover Swift 6.2’s new concurrency-safe NotificationCenter.Message APIs to ensure type safety, eliminate runtime errors, and streamline notification handling.
Explore how to bring SwiftData's elegant concurrency to Core Data. Learn to implement a Core Data version of @ModelActor using custom executors for safer, efficient data handling.
Explore @MainActor in SwiftUI: understand its use, solve concurrency issues, and learn best practices for Swift 6. Dive into View protocol updates & practical tips.
Explore SwiftData's elegant concurrency mechanism, a successor to Core Data. Learn how it uses serial queues and Actors for safe, efficient multi-threading. Discover best practices for data access and modification.
Explore how Combine and async/await can work together effectively. Learn their advantages, how to serialize event processing, and integrate them in Swift development, with practical code examples.
Explore Core Data concurrency tips: debug params, reduce blocking using perform, NSManagedObjectID & more. Enhance your app's performance & avoid common pitfalls.
Refactor SwiftUI state container with Swift 5.5's Async/Await. Learn how to handle side effects and ensure main thread updates for your app's state management.