I seem to have run into a regression in iOS11. I have an app that receives silent push notifications (push notifications with "content-available": 1) every hour in order to refresh itself. It has been working for years now with no problems.
However, after the iOS11 update, my users started reporting that they were seeing visible notifications with no message every hour - e.g.

I verified this.
- phone on iOS10. Left the phone running overnight - no blank messages.
- upgraded to iOS11 without reinstalling the app - blank messages
I added a breakpoint to didReceiveRemoteNotification and found that the notification was displayed before didReceiveRemoteNotification started running
The userInfo parameter of didReceiveRemoteNotification was
{
aps = {
alert = {
title = "e-mission-phone";
};
"content-available" = 1;
};
notId = 1506359243823816;
payload = {
notId = 1506359243823816;
};
}
So basically, it looks like iOS11 has changed the way in which it determines that a notification is silent and displays notifications that were previously hidden in iOS10.
I cannot find any documentation that this behavior is supposed to have changed, or what the new payload should look like. Has anybody else seen this? I am using the phonegap-push-plugin to receive notifications and ionic push to send notifications.
Answering my own question in the hope that it might help others. This is due to issues in the integration between ionic push and APNS, combined with a change in APNS behavior between iOS10 and iOS11. Basically, ionic push adds an alert title if the user does not specify it, and iOS10 apparently used to ignore the title if
content-available: 1but does not any more in iOS11.edit #1: I originally thought that this could be fixed by lowering the priority of the message, but that doesn't help. ionic really needs to stop setting a title if one is not provided. I've filed an ionic support ticket, but I am not sure when I will get a response.
edit #2: I can confirm, through extensive experimentation that there is no way to stop ionic from adding an alert title, even by setting the alert title to
"". Details, including config messages, are at https://github.com/e-mission/e-mission-phone/issues/290#issuecomment-332049861, but basically, if the spec passed in to ionic has a title, it is used, otherwise, ionic auto-adds a title.