From 2a2b607e3244ae73575b98115612c83f60cd0502 Mon Sep 17 00:00:00 2001 From: NachoSoto Date: Mon, 12 Aug 2024 23:37:53 -0700 Subject: [PATCH] Address `dispatch_assert_queue_fail` (#2161) See https://twitter.com/dimillian/status/1823089444397724003?s=61&t=SC3rvyJQWn1NQqAgMVrT0Q --- Packages/Env/Sources/Env/PushNotificationsService.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Packages/Env/Sources/Env/PushNotificationsService.swift b/Packages/Env/Sources/Env/PushNotificationsService.swift index 150c5316..066d1684 100644 --- a/Packages/Env/Sources/Env/PushNotificationsService.swift +++ b/Packages/Env/Sources/Env/PushNotificationsService.swift @@ -120,7 +120,7 @@ public struct HandledNotification: Equatable { } public func requestPushNotifications() { - UNUserNotificationCenter.current().requestAuthorization(options: [.alert, .sound, .badge]) { _, _ in + UNUserNotificationCenter.current().requestAuthorization(options: [.alert, .sound, .badge]) { @Sendable _, _ in DispatchQueue.main.async { UIApplication.shared.registerForRemoteNotifications() }