Push.on('notification') on iOS gets automatically triggered


#1

App is in foreground and notification is received.

Expected behaviour is to have notification in notification drawer and once I click it, then trigger push.on('notification' .. event.

What I’m getting is that once notification is received it automatically triggers push.on('notification', ... event.

GCM Notification payload:

{       
    "to":"**************************",
    "notification" : {
      "body" : "Comment was added on support ticket 1122",
      "title" : "Notification",
      "image": "icon"
    },
    "content-available": "1",
    "data" : {
        "event_type": "support_ticket_commented",
        "user_username": "User",
        "type": "event"
    }
}

I’m I missing something ?


#2

In meantime I found issue registered with phonegap push plugin:

Update:
I got replay on issue and it seems that this is native behaviour for iOS :frowning: