krz/domain-dig
an ios app for DNS & SSL analysis
clone: git clone https://gitbay.org/krz/domain-dig.git
f834c8a8223c40bd17b90be8f6ab7db843d0914c
unsigned
author: Christian Cleberg <hello@cleberg.net> · 2026-07-20T20:29:50Z
.../xcshareddata/xcschemes/DomainDig.xcscheme | 2 +- LocalAPIService.swift | 14 ++++++++------ Shared/SweepActivityAttributes.swift | 7 +++++-- 3 files changed, 14 insertions(+), 9 deletions(-) @@ -58,7 +58,7 @@ </CommandLineArgument> </CommandLineArguments> <StoreKitConfigurationFileReference - identifier = "../../../DomainDig.storekit"> + identifier = "../../DomainDig.storekit"> </StoreKitConfigurationFileReference> </LaunchAction> <ProfileAction @@ -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 } } ) @@ -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