Loading src/ios/APPLocalNotification.m +5 −6 Changes for src/ios/APPLocalNotification.m: 5 added lines, 6 removed lines. Original line number Diff line number Diff line Loading @@ -27,8 +27,6 @@ #import "UIApplication+APPLocalNotification.h" #import "UILocalNotification+APPLocalNotification.h" #import <Availability.h> @interface APPLocalNotification () // Retrieves the application state Loading Loading @@ -411,16 +409,17 @@ */ - (void) registerPermission:(CDVInvokedUrlCommand*)command { #if __IPHONE_OS_VERSION_MAX_ALLOWED >= 80000 if ([[UIApplication sharedApplication] respondsToSelector:@selector(registerUserNotificationSettings:)]) { _command = command; [self.commandDelegate runInBackground:^{ [self.app registerPermissionToScheduleLocalNotifications]; }]; #else } else { [self hasPermission:command]; #endif } } #pragma mark - Loading src/ios/UIApplication+APPLocalNotification.m +9 −7 Changes for src/ios/UIApplication+APPLocalNotification.m: 9 added lines, 7 removed lines. Original line number Diff line number Diff line Loading @@ -24,8 +24,6 @@ #import "UIApplication+APPLocalNotification.h" #import "UILocalNotification+APPLocalNotification.h" #import <Availability.h> @implementation UIApplication (APPLocalNotification) #pragma mark - Loading @@ -36,7 +34,9 @@ */ - (BOOL) hasPermissionToScheduleLocalNotifications { #if __IPHONE_OS_VERSION_MAX_ALLOWED >= 80000 if ([[UIApplication sharedApplication] respondsToSelector:@selector(registerUserNotificationSettings:)]) { UIUserNotificationType types; UIUserNotificationSettings *settings; Loading @@ -46,9 +46,9 @@ types = UIUserNotificationTypeAlert|UIUserNotificationTypeBadge|UIUserNotificationTypeSound; return (settings.types & types); #else } else { return YES; #endif } } /** Loading @@ -56,7 +56,9 @@ */ - (void) registerPermissionToScheduleLocalNotifications { #if __IPHONE_OS_VERSION_MAX_ALLOWED >= 80000 if ([[UIApplication sharedApplication] respondsToSelector:@selector(registerUserNotificationSettings:)]) { UIUserNotificationType types; UIUserNotificationSettings *settings; Loading @@ -67,7 +69,7 @@ [[UIApplication sharedApplication] registerUserNotificationSettings:settings]; #endif } } #pragma mark - Loading Loading
src/ios/APPLocalNotification.m +5 −6 Changes for src/ios/APPLocalNotification.m: 5 added lines, 6 removed lines. Original line number Diff line number Diff line Loading @@ -27,8 +27,6 @@ #import "UIApplication+APPLocalNotification.h" #import "UILocalNotification+APPLocalNotification.h" #import <Availability.h> @interface APPLocalNotification () // Retrieves the application state Loading Loading @@ -411,16 +409,17 @@ */ - (void) registerPermission:(CDVInvokedUrlCommand*)command { #if __IPHONE_OS_VERSION_MAX_ALLOWED >= 80000 if ([[UIApplication sharedApplication] respondsToSelector:@selector(registerUserNotificationSettings:)]) { _command = command; [self.commandDelegate runInBackground:^{ [self.app registerPermissionToScheduleLocalNotifications]; }]; #else } else { [self hasPermission:command]; #endif } } #pragma mark - Loading
src/ios/UIApplication+APPLocalNotification.m +9 −7 Changes for src/ios/UIApplication+APPLocalNotification.m: 9 added lines, 7 removed lines. Original line number Diff line number Diff line Loading @@ -24,8 +24,6 @@ #import "UIApplication+APPLocalNotification.h" #import "UILocalNotification+APPLocalNotification.h" #import <Availability.h> @implementation UIApplication (APPLocalNotification) #pragma mark - Loading @@ -36,7 +34,9 @@ */ - (BOOL) hasPermissionToScheduleLocalNotifications { #if __IPHONE_OS_VERSION_MAX_ALLOWED >= 80000 if ([[UIApplication sharedApplication] respondsToSelector:@selector(registerUserNotificationSettings:)]) { UIUserNotificationType types; UIUserNotificationSettings *settings; Loading @@ -46,9 +46,9 @@ types = UIUserNotificationTypeAlert|UIUserNotificationTypeBadge|UIUserNotificationTypeSound; return (settings.types & types); #else } else { return YES; #endif } } /** Loading @@ -56,7 +56,9 @@ */ - (void) registerPermissionToScheduleLocalNotifications { #if __IPHONE_OS_VERSION_MAX_ALLOWED >= 80000 if ([[UIApplication sharedApplication] respondsToSelector:@selector(registerUserNotificationSettings:)]) { UIUserNotificationType types; UIUserNotificationSettings *settings; Loading @@ -67,7 +69,7 @@ [[UIApplication sharedApplication] registerUserNotificationSettings:settings]; #endif } } #pragma mark - Loading