IOS push消息的数字不减少的问题,在做这个问题的时候。发现设置数字为0不能用,这时这个设置为0是写在应用程序加载的函数里面。只有双击Home键出现减号的时候删掉运行才会数字清零。
因此我把这个清零的数字写在
- (void)applicationDidEnterBackground:(UIApplication *)application
{ // Clear application badge when app launches application.applicationIconBadgeNumber = 0; /* Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. */ NSLog(@"c");}