gpt4 book ai didi

ios - 发送具有 2KB 有效负载大小的 Apple 推送通知

转载 作者:行者123 更新时间:2023-11-29 02:18:38 26 4
gpt4 key购买 nike

根据 Apple 文档 https://developer.apple.com/library/ios/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/Chapters/ApplePushService.html 很明显

In iOS 8 and later, the maximum size allowed for a notification payload is 2 kilobytes; Apple Push Notification service refuses any notification that exceeds this limit. (Prior to iOS 8 and in OS X, the maximum payload size is 256 bytes)

但是从服务器端我们不能根据 iOS 类型发送单独的推送通知,所以我想发送一个有效负载大小为 2kB(2048 字节)的推送通知而不会在 iOS 6 和 iOS 7(这是之前的版本)中失败到 iOS 8)。可能吗?

最佳答案

当你向你的服务器发送 token 推送时,你应该像iOS版本一样发送其他参数,这样你就可以控制这种事情,并进行统计。

我正在进行一些测试,您也可以向 iOS 7 设备发送 2 KB,但我尚未在任何 iOS 6 设备上进行测试。

关于ios - 发送具有 2KB 有效负载大小的 Apple 推送通知,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28430711/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com