如何发送没有声音的推送通知?

时间:2014-04-11 15:49:52

标签: quickblox

我可以在没有声音的情况下从QB Admin发送推送通知。从我的设备/应用程序发送推送通知时如何执行相同操作?只是省略声音键?

NSString *mesage = @"Hello man!";
NSMutableDictionary *payload = [NSMutableDictionary dictionary];
NSMutableDictionary *aps = [NSMutableDictionary dictionary];
// [aps setObject:@"default" forKey:QBMPushMessageSoundKey]; // just omit this line?
[aps setObject:mesage forKey:QBMPushMessageAlertKey];
[payload setObject:aps forKey:QBMPushMessageApsKey];

QBMPushMessage *message = [[QBMPushMessage alloc] initWithPayload:payload];

// Send push to users with ids 292,300,1295
[QBMessages TSendPush:message toUsers:@"292,300,1395" delegate:self];

此外,通知中的ID数量是否有限制?

1 个答案:

答案 0 :(得分:0)

是的,只需省略这一行。

ID的数量没有限制。但是如果你有很多ID,你也可以使用标签