Looks like iOS 26 & companions address this with beta 5:
In beta 5 SDK, CoreData changed several
Sendableannotations to resolve compatibility issues with Swift 6’s newMainActordefault isolation feature. These changes include markingNSManagedObjectasNS_SWIFT_NONISOLATED NS_SWIFT_NONSENDABLE, markingNSManagedObjectContextasNS_SWIFT_NONISOLATED NS_SWIFT_SENDABLE, and requiringNS_SWIFT_SENDABLEclosures for the family ofperform,performBlock,performBlockAndWaitand similar methods. These changes are ABI compatible with past releases but might introduce new warnings while building source code that violates the longstanding CoreData concurrency guidelines.
NSManagedObjectare mutable reference types inextricably related to others in a graph and cannot be madeSendable. They are expected to be isolated to the scope of theNSManagedObjectContextthat creates or fetches them.NSManagedObjectContextis a style of actor which encapsulates its own dispatch queue. While it’s impermissible to use many methods onNSManagedObjectContextfrom other threads, it is permissible to pass references around to invoke theperformBlockfamily of methods, for the purpose of routing aSendableclosure to its managed dispatch queue. CoreData supports a user default-com.apple.CoreData.ConcurrencyDebug 1which can be used to enable additional assertions. (153848710) (FB18216198)Workaround: Most new warnings detected by Swift from these changes are real data races, although some errors are not properly downgraded to warnings as the
@preconcurrencyattribute would indicate. To work around this, apply anonisolated(unsafe)closure local to errors involvingMainActorisolated state captured by aperformBlockclosure:
nonisolated(unsafe) let perform = {
                 // work
             }
             
             try context.performAndWait {
               try perform()
             }