使用quickblox消息推送通知增加徽章值计数

时间:2014-08-22 14:59:36

标签: ios push-notification chat quickblox badge

我在我的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];

0 个答案:

没有答案