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 ?

1

There are 1 best solutions below

0
On

It is possible since iOS 10 by creating a Notification Service Extension. You can check the documentation for its details. Also, here is a good tutorial from Avanderlee that explains how to add Notification Service Extension to you app.