Foreground or background handling

Handing of data messages on iOS depends on the foreground or background state of your app when the message is received.