iOS 13 changes:
Change 1: In iOS 13 Beta 6, a silent remote notification (AKA Background Notification) with priority 10 is no longer handled by the OS and dropped. This was documented in the past but never enforced.
Doc:
It's an error to specify this priority (10) for a notification whose payload contains the content-available key.
Log:
error 14:11:19.224387 +0300 dasd Not Supported: High-priority silent push. (App=)
default 14:11:19.224713 +0300 dasd Daemon Canceling Activities: {( com.apple.pushLaunch.com.some.bundle:64660B )}
default 14:11:19.225032 +0300 dasd CANCELED: com.apple.pushLaunch.com.some.bundle:64660B at priority 10 !
default 14:11:19.225363 +0300 dasd Removing a launch request for application by activity
Change 2: a new key, apns-push-type, is required when delivering notifications to devices running iOS 13 with the value background
or alert
.
After complying with the above, I'm still seeing random behavior regarding silent remote notifications. I can see that the notification arrives to the device and in some cases (even when the device is connected to a power source) the notification is dropped by the OS.
Fail Log:
default 12:19:33.450155 +0300 dasd Submitted Activity: com.apple.pushLaunch.some.bundle:3B0049 at priority 5 <§private>
default 12:19:33.457216 +0300 dasd Push not allowed for <§private>
default 12:19:33.457355 +0300 dasd Daemon Canceling Activities: {( com.apple.pushLaunch.some.bundle:3B0049 )}
Success log:
default 14:37:33.633462 +0300 dasd Submitted Activity: com.apple.pushLaunch.com.some.bundle:D1EEDF at priority 5 <§private>
default 14:37:33.639191 +0300 dasd Adding a launch request (<§private>) for application by activity <§private>
default 14:37:33.639240 +0300 dasd Launch requests for <§private>: <§private>
Going back to the doc:
Specify 5 to send the notification based on power considerations on the user’s device. Use this priority for notifications whose payload includes the content-available key. Notifications with this priority might be grouped and delivered in bursts to the user’s device. They may also be throttled, and in some cases not delivered.
From what I'm seeing, silent notifications are throttled and not delivered randomly (even if the battery is full and the device is connected to a power source)
Still trying to figure out if this is the correct behavior or a bug that Apple is going to fix.