Push Notifications Delivery

Number:rdar://FB13701617 Date Originated:29-03-2024
Status:Open Resolved:Open
Product:Notifications Product Version:macOS 14.4
Classification:Incorrect/Unexpected Behavior Reproducible:Yes
When posting notification payloads to APNS via the Push Notifications Console or a server/script, the payload is marked as delivered to APNS.

Subsequent delivery from APNS to the device fails under various circumstances, a newly discovered one begin: 
> discarded as device was offline

apns-unique-id: [REDACTED]

This is a background notification, as can be determined by the `content-available: 1` attribute in the payload.

The device in question is my Mac which I’ve been using to send payloads to APNS. So it’s clearly online, and is able to receive remote notifications from other apps. 

Furthermore, rebooting the Mac and dispatching a notification again yields the same error: “discarded as device was offline”.
Such payloads can be dispatched from the Push Notifications Console or a script/server. It mostly yields the same error.

When dispatching notifications from a script/server: the expiry of the notification is set to an hour later from the time of creating the payload. However, even after an hour has elapsed, no notification is received on the device. 



1. In the event that a device is actually powered down or in sleep mode, preventing the notification from being delivered, but it becomes available within the expiry time frame, the notification should be delivered to the device, and not discarded.

2. Kindly allow debugging of all development notifications scheduled from any origin in the Push Notifications Console, so developers can debug delivery issues when dispatching notifications from a server/script.



This is also impacting background notification deliveries for CloudKit running on iOS and macOS.


Upon further inspection:

  • Toggling the WiFi on/off on the device does has no affect.

  • Toggling iCloud Private Relay momentarily works, push notifications arrive, then stop again with the same error.

  • Toggling iCloud Private Relay off again momentarily works.

Furthermore, the apn-unique-id header value in responses cannot be looked up in the Push Notifications console, when the payload is sent to APNS from a script.

Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!