Silent push notifications never received in iOS 11

Originator:hamchapman
Number:rdar://34182776 Date Originated:31-Aug-2017 10:13 am
Status:Open Resolved:
Product:iOS + SDK Product Version:11 beta 8
Classification:Serious Bug Reproducible:Always
 
Summary:
Silent push notifications do not get received by devices running iOS 11

Steps to Reproduce:
- Create new iOS app
- Ensure iOS app has remote notifications background mode capability, as well as push notifications capability
- Register a device running iOS 11 beta 8 for receiving push notifications 
- Trigger a silent push notification and see if it gets delivered

Expected Results:
The silent push notification to be received and this function being called:

application(_ application: UIApplication, didReceiveRemoteNotification userInfo: [AnyHashable : Any], fetchCompletionHandler completionHandler: @escaping (UIBackgroundFetchResult) -> Void)

Actual Results:
The push notification is never received and this output is seen in Console.app:

default 10:03:39.139515 +0100 SpringBoard Received incoming message on topic gg.hc.apnstest at priority 1
default 10:03:39.140955 +0100 SpringBoard [gg.hc.apnstest] Received remote notification request 306D-00B4 [ hasAlertContent: 0, hasSound: 0 hasBadge: 0 hasContentAvailable: 1 hasMutableContent: 0 ]
default 10:03:39.141060 +0100 SpringBoard [gg.hc.apnstest] Deliver push notification request 306D-00B4
default 10:03:39.141143 +0100 SpringBoard [gg.hc.apnstest] Passing content-available push to Duet
error 10:03:39.144431 +0100 SpringBoard Ignoring notification with no alert, sound or badge (gg.hc.apnstest): 306D-00B4
default 10:03:39.144566 +0100 SpringBoard [gg.hc.apnstest] Not saving push notification 306D-00B4 to store [ error=Error Domain=UNErrorDomain Code=1401 "Notification has no user-facing content" UserInfo={NSLocalizedDescription=Notification has no user-facing content} ]


Version:
11 beta 8

Notes:

Comments

The unreliability makes remote notifications useless to me. Have to throw away a huge amount of work.

Apple's Tech Note 2265 basically says silent notifications are not reliable and may never get delivered int he background; furthermore, it specifically states there is nothing the developer nor user can do to improve the reliability.

As of iOS 10 (not just iOS 11): "If your notification payload contains the content-available key, your app will receive the notification if iOS or OS X determines it is energy-efficient to do so. If the energy or data budget for the device has been exceeded, your app will not receive any more notifications with the content-available key until the budget has been reset. This occurs once a day and cannot be changed by user or developer action. This throttle is disabled if the app is run from Xcode, so be sure to test your app by running it from the device to have the same user experience your customers will have."

It's important to underscore the fact that this issue was introduced in iOS 10 and is just a little worse in the latest release of iOS 11, as of this writing. For example, Stack Overflow has many desperate posts from developers dealing with this sort of problem, starting September last year. Or, event Apple's forums from last year reference this issue (for example, "Silent Push Notifications No Longer Work in iOS 10", https://forums.developer.apple.com/thread/64943)

In short, the "Background refresh" feature on iOS is totally unreliable and you shouldn't build critical functionality that depends on it. At current adoption rates, I assume this will be a problem for iOS developers for the next couple years until iOS 10 is typically no longer supported or maybe even until iOS 11 is no longer supported. It's a disaster.

Happens to me too. Any updates?

Hi, I'm facing the same issue. Did you get any update from Apple? I noticed that this is happening when you don't have the background modes in the plist

<key>UIBackgroundModes</key>
<array>
    <string>remote-notification</string>
</array>
By jan.chaloupecky at Sept. 23, 2017, 6:54 a.m. (reply...)

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!