Skip to content

Commit

Permalink
Do not request provisional access
Browse files Browse the repository at this point in the history
  • Loading branch information
7patricia committed Dec 13, 2019
1 parent f15295b commit c4ed80f
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions packages/messaging/ios/RNFBMessaging/RNFBMessagingModule.m
Original file line number Diff line number Diff line change
Expand Up @@ -145,12 +145,7 @@ - (NSDictionary *)constantsToExport {

RCTPromiseResolveBlock customResolver = ^(id result) {
if (@available(iOS 10.0, *)) {
UNAuthorizationOptions authOptions;
if (@available(iOS 12.0, *)) {
authOptions = UNAuthorizationOptionProvisional | UNAuthorizationOptionAlert | UNAuthorizationOptionSound | UNAuthorizationOptionBadge;
} else {
authOptions = UNAuthorizationOptionAlert | UNAuthorizationOptionSound | UNAuthorizationOptionBadge;
}
UNAuthorizationOptions authOptions = UNAuthorizationOptionAlert | UNAuthorizationOptionSound | UNAuthorizationOptionBadge;

[[UNUserNotificationCenter currentNotificationCenter] requestAuthorizationWithOptions:authOptions completionHandler:^(BOOL granted, NSError *_Nullable error) {
if (error) {
Expand Down

0 comments on commit c4ed80f

Please sign in to comment.