When does an iOS app receive messages?
Modified on: Tue, Aug 30, 2016 at 4:55 PM
Does an iOS app receive messages while the mobile device is locked, in sleep mode, or the app is in the background?
No, PubNub realtime messages are only received by an iOS app when the app is in the foreground (active). To wake up an app that is in the background (or not running at all), use Mobile Push Notifications (based on APNS).
Messages published while the app was in background (or the device was locked or asleep) can be retrieved via the History API (with enabled Storage/Replay add-on feature).
Did you find it helpful?
Can you please tell us how we can improve this article?