简体   繁体   English

iOS 10设备无法接收具有较小有效负载长度的Apple推送通知

[英]Apple push notification with smaller payload length is not being receive by iOS 10 device

We have a app in which we need to send push notifications for different scenarios. 我们有一个应用程序,我们需要为不同的场景发送推送通知。 But especially for one scenario the push notification is not being received by the iOS 10 devices. 但特别是对于一种情况,iOS 10设备没有接收到推送通知。 But the logs in the Backend (c# and SQL server) says the push notification was sent successfully and always says success. 但后端(c#和SQL服务器)中的日志表示推送通知已成功发送,并始终表示成功。 After a long debugging we found out that the payload for that notification is much less(<30 characters). 经过长时间的调试后,我们发现该通知的有效负载要少得多(<30个字符)。 When we increased that payload length(>60 characters) that device shows the notification. 当我们增加设备显示通知的有效负载长度(> 60个字符)时。

Is there any change with the apple push notification in the iOS 10 regarding payload length? iOS 10中关于有效负载长度的苹果推送通知是否有任何变化? As i have gone through their documents only the maximum length is specified 因为我浏览了他们的文件,只指定了最大长度

HTTP/2-based APNs provider API Regular push notification: 4KB (4096 bytes) Voice over Internet Protocol (VoIP) notification: 5KB (5120 bytes) Legacy APNs binary interface Regular push notification: 2KB (2048 bytes)

I am using push sharp dll to send push notification. 我正在使用push sharp dll发送推送通知。 Are there any change in push sharp for this? 推动锐利是否有任何改变?

We solved it by adding the apps name and a few default words before the actual payload to overcome this error and it works fine till now. 我们通过在实际有效负载之前添加应用程序名称和一些默认单词来解决此问题,以克服此错误,并且它一直运行良好。 But now in the latest iOS 11 and iOS 12 we don't have this problem. 但是现在在最新的iOS 11和iOS 12中我们没有这个问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM