增加设置本地的badge值的api

This commit is contained in:
zhangqinghe
2015-03-25 16:11:04 +08:00
parent 6d668101c5
commit 58b8cd45b2
4 changed files with 39 additions and 0 deletions
+13
View File
@@ -170,6 +170,19 @@
- (void)succeedWithPluginResult:(CDVPluginResult *)result withCallbackID:(NSString *)callbackID {
[self.commandDelegate sendPluginResult:result callbackId:callbackID];
}
-(void)setApplicationIconBadgeNumber:(CDVInvokedUrlCommand*)command{
//
NSArray *argument=command.arguments;
if ([argument count]<1) {
NSLog(@"setBadge argument error!");
return;
}
NSNumber *badge=[argument objectAtIndex:0];
[UIApplication sharedApplication].applicationIconBadgeNumber=[badge intValue];
}
- (CDVPluginResult *)pluginResultForValue:(id)value {
CDVPluginResult *result;