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. --- LocalAPIService.swift | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'LocalAPIService.swift') diff --git a/LocalAPIService.swift b/LocalAPIService.swift index ad1e07d..7d42128 100644 --- a/LocalAPIService.swift +++ b/LocalAPIService.swift @@ -182,14 +182,16 @@ final class LocalAPIService { let server = LocalAPIServer( port: Self.sanitizedPort(config.port), token: token, - requestLogger: { log in - Task { @MainActor [weak self] in - self?.record(log) + requestLogger: { [weak self] log in + guard let self else { return } + Task { @MainActor in + self.record(log) } }, - stateLogger: { stateMessage in - Task { @MainActor [weak self] in - self?.statusMessage = stateMessage + stateLogger: { [weak self] stateMessage in + guard let self else { return } + Task { @MainActor in + self.statusMessage = stateMessage } } ) -- cgit v1.2.3