From b50103f575103afa89938e3829a23997457c2144 Mon Sep 17 00:00:00 2001 From: Ben Shokati Date: Tue, 25 Jun 2024 08:30:22 -0700 Subject: [PATCH] Add provisional notifications permissions request --- ios/RNCPushNotificationIOS.m | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ios/RNCPushNotificationIOS.m b/ios/RNCPushNotificationIOS.m index bc6bb3d3..2ed4eedc 100644 --- a/ios/RNCPushNotificationIOS.m +++ b/ios/RNCPushNotificationIOS.m @@ -221,6 +221,10 @@ - (void)handleRemoteNotificationRegistrationError:(NSNotification *)notification if ([RCTConvert BOOL:permissions[@"critical"]]) { types |= UNAuthorizationOptionCriticalAlert; } + NSInteger authStatus = [RCTConvert NSInteger:permissions[@"authorizationStatus"]]; + if (authStatus == UNAuthorizationStatusProvisional) { + types |= UNAuthorizationOptionProvisional; + } } } else { types = UNAuthorizationOptionAlert | UNAuthorizationOptionBadge | UNAuthorizationOptionSound;