Pushwhoosh远程通知 [英] Pushwhoosh remote notification
本文介绍了Pushwhoosh远程通知的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我们使用Pushwhoosh进行远程通知。它工作正常,但Icon徽章数没有增加。
We used Pushwhoosh for remote notification. Its working fine but Icon badge count not increased.
这是代码:
- (void) onPushReceived:(PushNotificationManager *)pushManager withNotification:(NSDictionary *)pushNotification onStart:(BOOL)onStart
{
[[UIApplication sharedApplication] setApplicationIconBadgeNumber:0];
[[UIApplication sharedApplication] setApplicationIconBadgeNumber:1];
}
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
[[UIApplication sharedApplication] registerForRemoteNotificationTypes: (UIRemoteNotificationTypeSound | UIRemoteNotificationTypeAlert | UIRemoteNotificationTypeBadge)];
PushNotificationManager * pushManager = [PushNotificationManager pushManager];
pushManager.delegate = self;
if ([launchOptions objectForKey:UIApplicationLaunchOptionsLocationKey]) {
PushNotificationManager * pushManager = [PushNotificationManager pushManager];
[pushManager startLocationTracking];
}
[[UIApplication sharedApplication] setApplicationIconBadgeNumber:1];
[[UIApplication sharedApplication] setApplicationIconBadgeNumber:0];
}
如何在推送时增加应用图标徽章数?
How to increase app Icon badge count upon push delivery ?
推荐答案
得到解决方案。我们可以选择在推送服务器中设置通知徽章编号。
Got solution. We have option to set notification badge number in push whoosh server.
这篇关于Pushwhoosh远程通知的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文