启动故障排除后推送通知传送失败 [英] Troubleshooting post-boot push notification delivery failures

查看:152
本文介绍了启动故障排除后推送通知传送失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的应用程序成功接收推送通知,如果这两个在后台启动每个至少运行一次,当强制关闭(感谢PushKit)。

My app receives push notifications successfully if run at least once per boot both in the background and when force closed (thanks to PushKit).

如果我重新启动设备,我不会,直到我启动的应用程序至少一次接受任何推送。

If I reboot the device, I won't receive any pushes until I launch the app at least once.

我怎样才能得到这个场景的工作?我运行最新版的X code和iOS(8.3)

How can I get this scenario working? I'm running latest Xcode and iOS (8.3)

如果我留在后台运行,当我重新启动设备的应用程序,该应用程序仍显示在近期]菜单但不推收到,没有的AppDelegate入口点击(我有反正)。

If I leave the app running in the background when I reboot the device, the app still shows up in the recents menu however no pushes are received and no AppDelegate entry points are hit (that I have anyways).


  • 所有推/通知权限启用以及后台应用刷新

  • 背景模式功能被启用(VoIP,一键,取)

推荐答案

的问题是,应用程序就要休眠回调之前更新凭据。

The problem was that the app was going dormant before the callback to update credentials.

解决的办法是在 didLaunchWithOptions 来启动一个后台任务,并最终在 didUpdatePushCredentials 功能后台任务。

The solution was to start a background task in didLaunchWithOptions and end the background task in the didUpdatePushCredentials function.

这篇关于启动故障排除后推送通知传送失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆