Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}
Expand Down