Loading src/ios/APPLocalNotification.m +8 −9 Changes for src/ios/APPLocalNotification.m: 8 added lines, 9 removed lines. Original line number Diff line number Diff line Loading @@ -69,15 +69,21 @@ */ - (void) add:(CDVInvokedUrlCommand*)command { NSArray* notifications = command.arguments; [self.commandDelegate runInBackground:^{ for (NSDictionary* options in command.arguments) { for (NSMutableDictionary* options in notifications) { UILocalNotification* notification; notification = [[UILocalNotification alloc] initWithOptions:options]; [self scheduleLocalNotification:notification]; [self scheduleLocalNotification:[notification copy]]; [self fireEvent:@"add" localNotification:notification]; if (notifications.count > 1) { [NSThread sleepForTimeInterval:0.01]; } } [self execCallback:command]; Loading Loading @@ -267,13 +273,6 @@ { [self cancelForerunnerLocalNotification:notification]; NSString* state = self.applicationState; if ([state isEqualToString:@"background"]) { [[UIApplication sharedApplication] presentLocalNotificationNow:notification]; } [[UIApplication sharedApplication] scheduleLocalNotification:notification]; } Loading Loading
src/ios/APPLocalNotification.m +8 −9 Changes for src/ios/APPLocalNotification.m: 8 added lines, 9 removed lines. Original line number Diff line number Diff line Loading @@ -69,15 +69,21 @@ */ - (void) add:(CDVInvokedUrlCommand*)command { NSArray* notifications = command.arguments; [self.commandDelegate runInBackground:^{ for (NSDictionary* options in command.arguments) { for (NSMutableDictionary* options in notifications) { UILocalNotification* notification; notification = [[UILocalNotification alloc] initWithOptions:options]; [self scheduleLocalNotification:notification]; [self scheduleLocalNotification:[notification copy]]; [self fireEvent:@"add" localNotification:notification]; if (notifications.count > 1) { [NSThread sleepForTimeInterval:0.01]; } } [self execCallback:command]; Loading Loading @@ -267,13 +273,6 @@ { [self cancelForerunnerLocalNotification:notification]; NSString* state = self.applicationState; if ([state isEqualToString:@"background"]) { [[UIApplication sharedApplication] presentLocalNotificationNow:notification]; } [[UIApplication sharedApplication] scheduleLocalNotification:notification]; } Loading