Hi All,
Is there a way to set content-available:1 in IOS push notification inside "aps". As following methods are adding this to additional info of the push notification.
- apple(alert, sound, badgeCount, userData)
- apple(alertBody, actionLocKey, locKey, locArgs, launchImage, sound, badgeCount, userData)
1 answer
Hi AmareshYou may need to use PushNotificationPayload.apple method to construct the payload and then append 'content-avaialbe' attribute to aps .Map<String, Object> applePayload = Messaging.PushNotificationPayload.apple(<alert text>,<alert sound>,<badge count>, <free-form data>); //now append 'content-available' parameter to aps Map<String, Object> aps = (Map<String, Object>)applePayload.get('aps');aps.put('content-available', 1); //