5

APNS Content available push not received in iOS 15 device when app builds with Xcode 13.0,iOS 15 SDK.

Push payload data with content available:1 not working

{"aps":{"content-available":1},"update":"2|1"}

but normal notification message push working

{"aps":{"alert":"welcome"}}

is there any payload or configuration in the header field for the iOS 15 silent push message ?

PrasathBabu
  • 4,716
  • 4
  • 19
  • 35

1 Answers1

1

Yes, there is. According to Apple's Documentation:

The notification’s POST request should contain the apns-push-type header field with a value of background, and the apns-priority field with a value of 5. The APNs server requires the apns-push-type field when sending push notifications to Apple Watch, and recommends it for all platforms.

The header looks like this:

request_headers = {
    'apns-expiration': '0',
    'apns-priority': '5', # must be 5 for silent pushes, otherwise it will not be sent
    'apns-topic':'your_app_bundle_id',
    'authorization': 'bearer your_jwt_token'
    'apns-push-type': 'background' # this field is not required
}
Feller
  • 11
  • 3