On iOS, there are two channels to receive data messages when the app is in the foreground:
To determine which channel you are using, check for the the
content_available parameter in the message request. When this value is to
1, the message is sent via the APNs channel.