[英]Sending bulk notification to Apple Push Notification using Push Sharp in .Net
我们可以向.Net中的Push Sharp Apple Notification Service发送批量通知吗? 如果要将相似的消息发送到多个设备,如何在.net中发送此消息。 我知道如何发送到单个设备,但要求是发送到多个设备
是的! 有可能,就是不要在单个通知中设置多个设备令牌。 您需要将每个设备插入QueueNotification。 循环只是将这些设备添加到队列中,它会批量发送通知。
foreach (IosDevice device in devices)
{
push.QueueNotification(new AppleNotification()
.ForDeviceToken(device.DeviceToken)
.WithAlert(DateTime.Now.ToString())
.WithBadge(device.BadgeCount + 1)
.WithSound(notification.SoundFile));
}
希望这可以帮助 !
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.