Ahd Radwan
Ahd Radwan

Reputation: 1100

Push notification doesn't appear on notification center or locked screen

I'm working on an iOS app that uses push notifications. I followed this raywenderlich tutorial. I receive the notification when the app is running and it call the didReceiveRemoteNotification method.

But the notification doesn't appear on the notification center or on looked screen neither if the app is running nor it is terminated.

This is the payload object

payload =
{ 
   alert = "Title goes here";
   myid = 304;
   xxxxxx = 51;
   sound = default;
};

Upvotes: 0

Views: 594

Answers (1)

jcaron
jcaron

Reputation: 17710

Alert and sound must be in an aps object within your payload:

{
   "aps":
   {
     "alert": "blah",
     "sound": "default",
   },
   "myid": 12345
}

Upvotes: 1

Related Questions