Question Details

No question body available.

Tags

swift swiftdata

Answers (1)

Accepted Answer Available
Accepted Answer
June 16, 2025 Score: 5 Rep: 293,970 Quality: Expert Completeness: 80%

Update: In the official release of Xcode 26, this is no longer a problem. Now, the main actor isolation inference will ignore @Model classes, as their "primary definition directly conforms to a protocol that inherits SendableMetatype", as per the SE proposal. The rest of the answer still applies in general.


This is likely because the "default actor isolation" project setting is set to the main actor in your project settings:

enter image description here

This is the default when you create a new project using Xcode 26 beta 1.

This means that Rubric is implicitly isolated to the main actor. This makes its key paths not sendable, because the code must be running on the main actor to access those key paths.

You can either change that setting to "nonisolated", or make your @Model nonisolated.

@Model nonisolated class Rubric { ... }