Skip to content

Commit

Permalink
Merge pull request #800 from vneenz/master
Browse files Browse the repository at this point in the history
(ios) Fix foreground notifications not being displayed after calling grantPermission when permissions haven't been previously granted
  • Loading branch information
dpa99c authored May 22, 2023
2 parents d26c421 + 8cb1f88 commit abd4825
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/ios/FirebasePlugin.m
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,7 @@ - (void)grantPermission:(CDVInvokedUrlCommand *)command {
@try {
NSLog(@"requestAuthorizationWithOptions: granted=%@", granted ? @"YES" : @"NO");
if (error == nil && granted) {
[UNUserNotificationCenter currentNotificationCenter].delegate = AppDelegate.instance;
[self registerForRemoteNotifications];
}
[self handleBoolResultWithPotentialError:error command:command result:granted];
Expand Down

0 comments on commit abd4825

Please sign in to comment.