If my payload from the server is
{ "aps" : { "alert" : "You got a mail";
"badge" : 0;
}
"user": { "name" : "Nicole" } }`
And It also gives me some other data about the name of user who sent it . Is there a way to display custom message in the format : "Nicole sent a mail" in the notification center or banner ?
It is possible since
iOS 10
by creating aNotification Service Extension
. You can check the documentation for its details. Also, here is a good tutorial from Avanderlee that explains how to addNotification Service Extension
to you app.