0

I got a question that i can't figure out a long time. I know that i can't sync my application in "not-running" state. But let me show a simple scenario:

  1. I killed WhatsApp. It's not running.
  2. I send a message from another device.
  3. Remote notification received and alert shown.
  4. I activated "plane mode" on receiver device.
  5. Then i launch WhatsApp.
  6. It can't sync messages because of "plane mode" but i saw new message that received with remote notification.

I tested this scenario on iOS 9 and iOS 10 devices. How does it posible? Can anyone explain this?

4

1 回答 1

0

我认为他们正在使用远程通知后台模式。

“如果您的服务器在您的应用程序有新内容可用时向用户的设备发送推送通知,您可以要求系统在后台运行您的应用程序,以便它可以立即开始下载新内容。这种后台模式的意图是为了尽量减少从用户看到推送通知到您的应用能够显示相关内容之间的时间量。应用通常在用户看到通知的大致同一时间被唤醒,但仍然给你比其他方式更多的时间。”

这是来自开发者苹果。您可以在“使用推送通知启动下载”下的这篇文章中阅读有关它的更多详细信息。

希望它会有所帮助。

于 2017-08-11T12:25:28.710 回答