Skip to content

Commit

Permalink
Removed the device token change
Browse files Browse the repository at this point in the history
  • Loading branch information
ketanshikharebsft committed Feb 12, 2021
1 parent 82cb740 commit d4b7061
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions BlueShift-iOS-SDK/BlueShiftAppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,9 @@ - (void)registerForSilentPushNotification {
if (@available(iOS 10.0, *)) {
[[UNUserNotificationCenter currentNotificationCenter] getNotificationSettingsWithCompletionHandler:^(UNNotificationSettings * _Nonnull settings) {
if ([settings authorizationStatus] != UNAuthorizationStatusAuthorized) {
if (![[BlueShift sharedInstance] getDeviceToken]) {
dispatch_async(dispatch_get_main_queue(), ^(void) {
[[UIApplication sharedApplication] registerForRemoteNotifications];
});
}
dispatch_async(dispatch_get_main_queue(), ^(void) {
[[UIApplication sharedApplication] registerForRemoteNotifications];
});
[self checkUNAuthorizationStatus];
[BlueshiftLog logInfo:@"config.enablePushNotification is set to false. Registered for background silent notifications" withDetails:nil methodName:nil];
} else {
Expand Down

0 comments on commit d4b7061

Please sign in to comment.