From 632d4a6d13d7e4257a303f14503fb5f66717bb7f Mon Sep 17 00:00:00 2001 From: David Watkins Date: Fri, 14 Jan 2022 00:49:02 -0800 Subject: [PATCH] Request criticalAlert notifications permissions --- .../PushNotificationsPlugin/PushNotificationsHandler.swift | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/push-notifications/ios/Sources/PushNotificationsPlugin/PushNotificationsHandler.swift b/push-notifications/ios/Sources/PushNotificationsPlugin/PushNotificationsHandler.swift index f3972b68a..903b3b3ff 100644 --- a/push-notifications/ios/Sources/PushNotificationsPlugin/PushNotificationsHandler.swift +++ b/push-notifications/ios/Sources/PushNotificationsPlugin/PushNotificationsHandler.swift @@ -6,7 +6,8 @@ public class PushNotificationsHandler: NSObject, NotificationHandlerProtocol { var notificationRequestLookup = [String: JSObject]() public func requestPermissions(with completion: ((Bool, Error?) -> Void)? = nil) { - UNUserNotificationCenter.current().requestAuthorization(options: [.alert, .sound, .badge]) { granted, error in + // @todo how can we parameterize criticalAlert here? Would be nice to control this from JS and submit upstream + UNUserNotificationCenter.current().requestAuthorization(options: [.alert, .sound, .badge, .criticalAlert]) { granted, error in completion?(granted, error) } }