From 24440fc067d64a9cee9e6c64d576df430c715270 Mon Sep 17 00:00:00 2001 From: Andreas Bauer Date: Thu, 15 Aug 2024 11:15:21 +0200 Subject: [PATCH] Minor concurrency adjustments --- Sources/Spezi/Spezi/SpeziAppDelegate.swift | 2 +- Sources/Spezi/Spezi/SpeziNotificationCenterDelegate.swift | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Sources/Spezi/Spezi/SpeziAppDelegate.swift b/Sources/Spezi/Spezi/SpeziAppDelegate.swift index 23363f0..a4c5a4f 100644 --- a/Sources/Spezi/Spezi/SpeziAppDelegate.swift +++ b/Sources/Spezi/Spezi/SpeziAppDelegate.swift @@ -166,7 +166,7 @@ open class SpeziAppDelegate: NSObject, ApplicationDelegate, Sendable { let result: Set = await withTaskGroup(of: BackgroundFetchResult.self) { @MainActor group in for handler in handlers { - group.addTask { @MainActor in + group.addTask { @Sendable @MainActor in await handler.receiveRemoteNotification(userInfo) } } diff --git a/Sources/Spezi/Spezi/SpeziNotificationCenterDelegate.swift b/Sources/Spezi/Spezi/SpeziNotificationCenterDelegate.swift index b44bd1d..d23464e 100644 --- a/Sources/Spezi/Spezi/SpeziNotificationCenterDelegate.swift +++ b/Sources/Spezi/Spezi/SpeziNotificationCenterDelegate.swift @@ -29,7 +29,7 @@ class SpeziNotificationCenterDelegate: NSObject { } for handler in delegate.spezi.notificationHandler { - group.addTask { @MainActor in + group.addTask { @Sendable @MainActor in await handler.handleNotificationAction(response) } }