iOS unable to receive the "apns-collapse-id" when push notification is sent from AWS(SNS) -> Firebase(FCM)-> APNS

Viewed 358

AWS SNS sends the Push Notification to Firebase(FCM) and then to APNS. AWS(SNS) -> FCM -> APNS

When the push notification is sent from SNS to FCM the apns-collpase-id gets lost, and the push notifications are not collapsed.

  • We are trying to add apps-collapse-id to iOS Push payload, as we need collapsable behaviour of Push Notifications.

  • We are using GCM tag to send iOS push notification as our iOS app has push notifications configured using Firebase.

Payload used to add collapse id-

{
  "GCM": "{ \"notification\": {\"title\": \"My Title\", \"body\": \"My Body\", \"sound\": \"default\",\"tag\": \"green\",  \"content_available\": true, \"mutable_content\":true}, \"data\": { \"message\": \"Sample message for Android endpoints\" }, \"apns\": {\"headers\": { \"apns-priority\": \"10\"},\"aps\":{\"mutable-content\":1,\"content-available\":1,\"apns-collapse-id\": \"evisit\"}}}"
}

But when the push is delivered to iOS device the apps-collapse-id is not delivered hence we are unable to collapse iOS push notifications.

0 Answers
Related