iOS foreground data message handling

On iOS, there are two channels to receive data messages when the app is in the foreground:

  1. Direct FCM delivery. FCM legacy HTTP and XMPP APIs only.
  2. APNs delivery. All HTTP v1 API message requests use this channel.

To determine which channel you are using, check for the the content_available parameter in the message request. When this value is to true or 1, the message is sent via the APNs channel.