iOS 11 推送通知不适用于 PushWoosh

iOS 11 Push notifications do not work with PushWoosh

我有一个关于 iOS 11 推送通知的问题。

我们的应用程序在更新到 iOS 11 后没有收到推送通知。它在 iOS 10.

中运行良好

配置文件、代码签名和分发环境(App Store、TestFlight)没有改变。

你能告诉我我们还可以检查什么吗?

检查清单很少,你应该检查一下

  • 确保您的提供商拥有有效的 APNS 证书
  • 确保应用已成功注册到 APNS 服务器。
  • 您的应用程序将最新的设备令牌发送给应用程序的关联提供商。切勿在您的应用中缓存设备令牌;相反,在需要时从系统中获取它们。 当特定事件发生时,APNs 会向您的应用程序发出新的设备令牌。 例如

    when a user restores a device from a backup, when the user installs your app on a new device, and when the user reinstalls the operating system

  • 确保负载不超过最大限制。 APNs 拒绝负载超过最大允许大小的通知。检查负载大小:

    • For regular remote notifications, the maximum size is 4KB (4096 bytes).
    • For Voice over Internet Protocol (VoIP) notifications, the maximum size is 5KB (5120 bytes)
  • 确保负载包含一个 aps 字典和一个简单的警报消息。 acme2 键包含一组特定于应用程序的数据。

    {
        "aps" : { "alert" : "Message received from Bob" },
        "acme2" : [ "bang",  "whiz" ]
    } 
    

谢谢!

如果您使用的是 PushWoosh iOS SDK,则需要升级到 v5.3.7 or higher for iOS 11 compatibility. If using Cordova (PhoneGap), upgrade your plugin to v7.0.7 或更高版本。

iOS 主要版本发布涉及 APNS 架构重大更改,PushWoosh SDK 和插件必须相应升级。现在至少 iOS 10 和 11 就是这种情况。预计 iOS 12 一天会有更多相同的结果。