【问题标题】:UA: didReceiveRemoteNotification:fetchCompletionHandler not being called when app is in background AND connected to XcodeUA:didReceiveRemoteNotification:当应用程序处于后台并连接到 Xcode 时未调用fetchCompletionHandler
【发布时间】:2014-02-25 11:07:09
【问题描述】:

我想在我的应用中实现(静默)远程通知, 请注意,我已经实现了定期推送通知。

步骤:

  1. 在我的项目中启用后台功能(远程通知)

  2. 在我的 AppDelegate 中添加 didReceiveRemoteNotification:fetchCompletionHandler

  3. 使用 Urban Airship 发送推送通知* (`"content-available" = 1;)

*UA 3.03.

仅当应用在前台处于活动状态时才有效。

我是不是做错了什么?

谢谢

【问题讨论】:

  • 有任何更新让我们知道吗?

标签: ios objective-c ios7 push-notification fetch


【解决方案1】:

我想我找到了问题:

"content-available" = 1 必须在 aps 内部

例如

{"aps":{"alert":"Hi", "content-available":"1"},"device_tokens":["…"]}

【讨论】:

  • 这不会推送静默通知 :( 这能解决您的问题吗?
猜你喜欢
  • 1970-01-01
  • 2021-10-02
  • 2017-03-10
  • 2017-11-06
  • 2016-02-24
  • 1970-01-01
  • 2018-02-07
  • 1970-01-01
  • 2020-02-10
相关资源
最近更新 更多