From 9dcfc2b09ce9148ab8d3d17d7cf0669cc33bd34b Mon Sep 17 00:00:00 2001 From: Brent Simmons Date: Fri, 3 May 2024 22:35:20 -0700 Subject: [PATCH] Fix concurrency warning. --- iOS/AppDelegate.swift | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/iOS/AppDelegate.swift b/iOS/AppDelegate.swift index ca28d7146..a627327f8 100644 --- a/iOS/AppDelegate.swift +++ b/iOS/AppDelegate.swift @@ -204,11 +204,12 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD } } - func userNotificationCenter(_ center: UNUserNotificationCenter, willPresent notification: UNNotification, withCompletionHandler completionHandler: @escaping (UNNotificationPresentationOptions) -> Void) { + nonisolated func userNotificationCenter(_ center: UNUserNotificationCenter, willPresent notification: UNNotification, withCompletionHandler completionHandler: @escaping (UNNotificationPresentationOptions) -> Void) { + completionHandler([.list, .banner, .badge, .sound]) } - func userNotificationCenter(_ center: UNUserNotificationCenter, didReceive response: UNNotificationResponse, withCompletionHandler completionHandler: @escaping () -> Void) { + func userNotificationCenter(_ center: UNUserNotificationCenter, didReceive response: UNNotificationResponse, withCompletionHandler completionHandler: @escaping () -> Void) { defer { completionHandler() } let userInfo = response.notification.request.content.userInfo