Loading src/ios/PushPlugin.m +8 −1 Changes for src/ios/PushPlugin.m: 8 added lines, 1 removed line. Original line number Diff line number Diff line Loading @@ -125,7 +125,14 @@ [results setValue:[[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleVersion"] forKey:@"appVersion"]; // Check what Notifications the user has turned on. We registered for all three, but they may have manually disabled some or all of them. NSUInteger rntypes = [[UIApplication sharedApplication] enabledRemoteNotificationTypes]; #define SYSTEM_VERSION_LESS_THAN(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedAscending) NSUInteger rntypes; if (!SYSTEM_VERSION_LESS_THAN(@"8.0")) { rntypes = [[[UIApplication sharedApplication] currentUserNotificationSettings] types]; } else { rntypes = [[UIApplication sharedApplication] enabledRemoteNotificationTypes]; } // Set the defaults to disabled unless we find otherwise... NSString *pushBadge = @"disabled"; Loading Loading
src/ios/PushPlugin.m +8 −1 Changes for src/ios/PushPlugin.m: 8 added lines, 1 removed line. Original line number Diff line number Diff line Loading @@ -125,7 +125,14 @@ [results setValue:[[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleVersion"] forKey:@"appVersion"]; // Check what Notifications the user has turned on. We registered for all three, but they may have manually disabled some or all of them. NSUInteger rntypes = [[UIApplication sharedApplication] enabledRemoteNotificationTypes]; #define SYSTEM_VERSION_LESS_THAN(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedAscending) NSUInteger rntypes; if (!SYSTEM_VERSION_LESS_THAN(@"8.0")) { rntypes = [[[UIApplication sharedApplication] currentUserNotificationSettings] types]; } else { rntypes = [[UIApplication sharedApplication] enabledRemoteNotificationTypes]; } // Set the defaults to disabled unless we find otherwise... NSString *pushBadge = @"disabled"; Loading