From my understanding, when app is running or in the foreground and a push notification is received, the app should NOT show any alert but the app delegate will call the
This answer is for swift users looking for the same thing
let state = application.applicationState
if (state == .active) {
//app is in foreground
//the push is in your control
} else {
//app is in background:
//iOS is responsible for displaying push alerts, banner etc..
}
Please refer to the checked answer if you guys have any more doubts. Apple Documentation on handling Notifications