iOS Push : on('notification') event not triggered (randomly)

Hey there !

I have some problems with Ionic Push. Sometimes, when I send a notification, iOS notifies me but the icon badge remains to 0. So I think that the on(‘notification’) event is not triggered. But sometimes it’s working perfectly.

When I open the app, and I send a notification, the icon badge sets correctly (everytime).

When I totally close the app, and send a notification, the icon badge remains to 0 (everytime).

I really don’t understand why there are random results… I think the bug is coming from the event on(‘notification’) but I can’t find out why. When this event is triggered, I store the push data in LocalStorage and I update the badge number manually.

Hope someone could help me on this. Thanks by advance.

Grégory