Loading src/ios/APPLocalNotification.h +7 −0 Changes for src/ios/APPLocalNotification.h: 7 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -61,6 +61,13 @@ // List all ids from all triggered notifications - (void) getTriggeredIds:(CDVInvokedUrlCommand*)command; // Propertys for given local notification - (void) getSingle:(CDVInvokedUrlCommand*)command; // Propertya for given scheduled notification - (void) getSingleScheduled:(CDVInvokedUrlCommand*)command; // Propertys for given triggered notification - (void) getSingleTriggered:(CDVInvokedUrlCommand*)command; // Property list for given local notifications - (void) getAll:(CDVInvokedUrlCommand*)command; // Property list for given scheduled notifications Loading src/ios/APPLocalNotification.m +54 −0 Changes for src/ios/APPLocalNotification.m: 54 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -313,6 +313,28 @@ }]; } /** * Propertys for given local notification. */ - (void) getSingle:(CDVInvokedUrlCommand*)command { [self getOption:command byType:NotifcationTypeAll]; } /** * Propertya for given scheduled notification. */ - (void) getSingleScheduled:(CDVInvokedUrlCommand*)command { [self getOption:command byType:NotifcationTypeScheduled]; } // Propertys for given triggered notification - (void) getSingleTriggered:(CDVInvokedUrlCommand*)command { [self getOption:command byType:NotifcationTypeTriggered]; } /** * Property list for given local notifications. * Loading Loading @@ -346,6 +368,38 @@ [self getOptions:command byType:NotifcationTypeTriggered]; } /** * Propertys for given triggered notification. * * @param type * Notification life cycle type * @param ids * The ID of the notification */ - (void) getOption:(CDVInvokedUrlCommand*)command byType:(APPLocalNotificationType)type; { [self.commandDelegate runInBackground:^{ NSArray* ids = command.arguments; NSArray* notifications; CDVPluginResult* result; if (type == NotifcationTypeAll) { notifications = [self.app localNotificationOptionsById:ids]; } else { notifications = [self.app localNotificationOptionsByType:type andId:ids]; } result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsDictionary:notifications[0]]; [self.commandDelegate sendPluginResult:result callbackId:command.callbackId]; }]; } /** * Property list for given triggered notifications. * Loading Loading
src/ios/APPLocalNotification.h +7 −0 Changes for src/ios/APPLocalNotification.h: 7 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -61,6 +61,13 @@ // List all ids from all triggered notifications - (void) getTriggeredIds:(CDVInvokedUrlCommand*)command; // Propertys for given local notification - (void) getSingle:(CDVInvokedUrlCommand*)command; // Propertya for given scheduled notification - (void) getSingleScheduled:(CDVInvokedUrlCommand*)command; // Propertys for given triggered notification - (void) getSingleTriggered:(CDVInvokedUrlCommand*)command; // Property list for given local notifications - (void) getAll:(CDVInvokedUrlCommand*)command; // Property list for given scheduled notifications Loading
src/ios/APPLocalNotification.m +54 −0 Changes for src/ios/APPLocalNotification.m: 54 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -313,6 +313,28 @@ }]; } /** * Propertys for given local notification. */ - (void) getSingle:(CDVInvokedUrlCommand*)command { [self getOption:command byType:NotifcationTypeAll]; } /** * Propertya for given scheduled notification. */ - (void) getSingleScheduled:(CDVInvokedUrlCommand*)command { [self getOption:command byType:NotifcationTypeScheduled]; } // Propertys for given triggered notification - (void) getSingleTriggered:(CDVInvokedUrlCommand*)command { [self getOption:command byType:NotifcationTypeTriggered]; } /** * Property list for given local notifications. * Loading Loading @@ -346,6 +368,38 @@ [self getOptions:command byType:NotifcationTypeTriggered]; } /** * Propertys for given triggered notification. * * @param type * Notification life cycle type * @param ids * The ID of the notification */ - (void) getOption:(CDVInvokedUrlCommand*)command byType:(APPLocalNotificationType)type; { [self.commandDelegate runInBackground:^{ NSArray* ids = command.arguments; NSArray* notifications; CDVPluginResult* result; if (type == NotifcationTypeAll) { notifications = [self.app localNotificationOptionsById:ids]; } else { notifications = [self.app localNotificationOptionsByType:type andId:ids]; } result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsDictionary:notifications[0]]; [self.commandDelegate sendPluginResult:result callbackId:command.callbackId]; }]; } /** * Property list for given triggered notifications. * Loading