我在我的ios应用程序中集成Quickblox进行聊天。每当出现聊天通知时,应用程序面临的问题不会增加背景中的徽章数量每次徽章计数显示为1.
对于发送聊天,我使用下面的代码
NSMutableDictionary *payload = [NSMutableDictionary dictionary];
NSMutableDictionary *aps = [NSMutableDictionary dictionary];
[aps setObject:@"default" forKey:QBMPushMessageSoundKey];
[aps setObject:@"1" forKey:QBMPushMessageBadgeKey];
[aps setObject:@"helo second chat" forKey:QBMPushMessageAlertKey];
[payload setObject:aps forKey:QBMPushMessageApsKey];
QBMPushMessage *pushMessage = [[QBMPushMessage alloc] initWithPayload:payload];
[QBMessages TSendPush:pushMessage toUsers:@"112345" delegate:self];