退出飞行模式后未收到ios推送通知

问题描述 投票:0回答:1

我在夜间手机处于飞行模式时使用 Noted Gem 发送推送通知。当我醒来并禁用飞行模式时,我没有收到推送通知。

这些是设置:

  def ios_format(apn)
      apn.custom_payload = { universal_link: url }
      apn.alert = { title: title(recipient), body: message(recipient) }
      apn.sound = 'default'
      apn.priority = '10' # Send immediately, bypassing the
  end

默认有效期为 30 天。

如何调试/解决问题? (带有注意到的宝石)

我检查了Apple consoleKIT,没有看到丢弃的通知。

谢谢

ios ruby-on-rails push-notification apple-push-notifications
1个回答
0
投票

存储和转发推送通知

iOS 飞行模式停用后,只会收到最后一条推送通知。这是 Cupertino 的 APNs 推送 API 的典型行为。它完全独立于 Ruby on Rails

Noticed gem
或类似服务。因此,如果在 iOS 设备离线时发送多个通知,则每个新通知都会导致先前的通知被丢弃。此外,最后一条通知的存储时间有限。如果用户的设备长时间保持离线状态,则为其存储的任何通知都将被丢弃。

© www.soinside.com 2019 - 2024. All rights reserved.