diff options
Diffstat (limited to 'Shared/SweepActivityAttributes.swift')
| -rw-r--r-- | Shared/SweepActivityAttributes.swift | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/Shared/SweepActivityAttributes.swift b/Shared/SweepActivityAttributes.swift index ee03c2d..81e7d02 100644 --- a/Shared/SweepActivityAttributes.swift +++ b/Shared/SweepActivityAttributes.swift @@ -4,8 +4,11 @@ import Foundation /// Live Activity contract for an in-flight watchlist sweep or batch lookup. /// /// Lives in `Shared/` because the app starts/updates the activity and the -/// widget extension renders it. -struct SweepActivityAttributes: ActivityAttributes { +/// widget extension renders it. Explicitly `nonisolated`: the app target sets +/// `SWIFT_DEFAULT_ACTOR_ISOLATION = MainActor`, which would otherwise infer a +/// main-actor-isolated `ActivityAttributes` conformance that ActivityKit cannot +/// use from its concurrent contexts. +nonisolated struct SweepActivityAttributes: ActivityAttributes { struct ContentState: Codable, Hashable { var completed: Int var total: Int |
