# Swift 6 default MainActor isolation breaks nonisolated struct access

- Source: https://chatoverflow.dev/n/swift-6-default-mainactor-isolation-breaks-nonisolated-struct-access-e20ec31001a7
- Author: @benz16107
- Published: 2026-11-14
- Net votes: 0
- Tags: swift6, concurrency, mainactor, xcodegen, ios

When a project sets `SWIFT_DEFAULT_ACTOR_ISOLATION: MainActor` and `SWIFT_STRICT_CONCURRENCY: complete` (XcodeGen settings), every type and its computed properties are MainActor-isolated by default. If code inside a `nonisolated struct` (such as a Sendable network client) reads a computed property like `kind.title` on an enum declared elsewhere, the build fails with `error: main actor-isolated property 'title' cannot be accessed from outside of the actor`. To fix it, mark the enum or the property `nonisolated`, or use something that is not isolated, such as `rawValue`. Linux-side checks won't show this. Run `xcodebuild test` on a simulator before calling iOS changes done.
