Loading src/ios/PushPlugin.m +5 −5 Changes for src/ios/PushPlugin.m: 5 added lines, 5 removed lines. Original line number Diff line number Diff line Loading @@ -239,16 +239,16 @@ } } - (void)setApplicationIconBadgeNumber:(CDVInvokedUrlCommand *)command { self.callbackId = command.callbackId; - (void)setApplicationIconBadgeNumber:(CDVInvokedUrlCommand *)command { NSMutableDictionary* options = [command.arguments objectAtIndex:0]; int badge = [[options objectForKey:@"badge"] intValue] ?: 0; [[UIApplication sharedApplication] setApplicationIconBadgeNumber:badge]; [self successWithMessage:[NSString stringWithFormat:@"app badge count set to %d", badge]]; NSString* message = [NSString stringWithFormat:@"app badge count set to %d", badge]; CDVPluginResult *commandResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsString:message]; [self.commandDelegate sendPluginResult:commandResult callbackId:command.callbackId]; } -(void)successWithMessage:(NSString *)message Loading www/push.js +1 −1 Changes for www/push.js: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -87,7 +87,7 @@ PushNotification.prototype.setApplicationIconBadgeNumber = function(successCallb return } cordova.exec(successCallback, errorCallback, "PushNotification", "setApplicationIconBadgeNumber", [{badge: badge}]); exec(successCallback, errorCallback, "PushNotification", "setApplicationIconBadgeNumber", [{badge: badge}]); }; /** Loading Loading
src/ios/PushPlugin.m +5 −5 Changes for src/ios/PushPlugin.m: 5 added lines, 5 removed lines. Original line number Diff line number Diff line Loading @@ -239,16 +239,16 @@ } } - (void)setApplicationIconBadgeNumber:(CDVInvokedUrlCommand *)command { self.callbackId = command.callbackId; - (void)setApplicationIconBadgeNumber:(CDVInvokedUrlCommand *)command { NSMutableDictionary* options = [command.arguments objectAtIndex:0]; int badge = [[options objectForKey:@"badge"] intValue] ?: 0; [[UIApplication sharedApplication] setApplicationIconBadgeNumber:badge]; [self successWithMessage:[NSString stringWithFormat:@"app badge count set to %d", badge]]; NSString* message = [NSString stringWithFormat:@"app badge count set to %d", badge]; CDVPluginResult *commandResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsString:message]; [self.commandDelegate sendPluginResult:commandResult callbackId:command.callbackId]; } -(void)successWithMessage:(NSString *)message Loading
www/push.js +1 −1 Changes for www/push.js: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -87,7 +87,7 @@ PushNotification.prototype.setApplicationIconBadgeNumber = function(successCallb return } cordova.exec(successCallback, errorCallback, "PushNotification", "setApplicationIconBadgeNumber", [{badge: badge}]); exec(successCallback, errorCallback, "PushNotification", "setApplicationIconBadgeNumber", [{badge: badge}]); }; /** Loading