Skip to content

Commit

Permalink
resiter remote on provisional approve (#759)
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielEliraz authored Jul 21, 2021
1 parent 885f053 commit 8d984ce
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/ios/RNNotificationCenter.m
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ - (void)requestPermissions:(NSDictionary *)options {
[UNUserNotificationCenter.currentNotificationCenter requestAuthorizationWithOptions:authOptions completionHandler:^(BOOL granted, NSError * _Nullable error) {
if (!error && granted) {
[UNUserNotificationCenter.currentNotificationCenter getNotificationSettingsWithCompletionHandler:^(UNNotificationSettings * _Nonnull settings) {
if (settings.authorizationStatus == UNAuthorizationStatusAuthorized) {
if (settings.authorizationStatus == UNAuthorizationStatusAuthorized || settings.authorizationStatus == UNAuthorizationStatusProvisional) {
dispatch_async(dispatch_get_main_queue(), ^{
[[UIApplication sharedApplication] registerForRemoteNotifications];
});
Expand Down

0 comments on commit 8d984ce

Please sign in to comment.