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.