From f834c8a8223c40bd17b90be8f6ab7db843d0914c Mon Sep 17 00:00:00 2001 From: Christian Cleberg Date: Mon, 20 Jul 2026 15:29:50 -0500 Subject: fix: StoreKit config path and Swift 6 concurrency warnings The StoreKitConfigurationFileReference added in #11 used one '../' too many, resolving outside the repository. Xcode resolves it relative to the .xcodeproj's xcshareddata directory, so two levels reaches the repo root. SweepActivityAttributes is now explicitly nonisolated. The app target sets SWIFT_DEFAULT_ACTOR_ISOLATION = MainActor while the widget target does not, so a type shared by both inferred a main-actor-isolated ActivityAttributes conformance that ActivityKit cannot use from its concurrent contexts. LocalAPIService's logger closures captured self strongly while their inner Tasks declared [weak self]. The weak capture is now on the outer closure and bound before the Task, so the concurrently-executing closure references an immutable strong local rather than the weak capture. --- Shared/SweepActivityAttributes.swift | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'Shared/SweepActivityAttributes.swift') 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 -- cgit v1.2.3