4

Is there a way to set up how users see the push notifications alert box? My notifications are appearing without the view / cancel buttons, but i'm receiving others from different apps with those buttons. Is that a setting i should set before sending the push notification?

Thanks!

albertosh
  • 2,047
  • 4
  • 21
  • 30

2 Answers2

7

There are two things going on in your question.

First, you will see no buttons at all when you receive Apple Push Notification alerts and your screen is locked. All Apps will have just the Title and the Message of the Alert, without the buttons. If your phone is unlocked, you will see the buttons.

Second, altering the Payload, you can customize the "View" button text (or remove it) Apple Push Documentation with the "action-loc-key" key. If you set it to null, only "OK" will be presented. If you specify a value, it must be a localized string in your Application and the "View" will be replaced with that value.

extempl
  • 2,638
  • 22
  • 34
Smith3
  • 631
  • 4
  • 5
  • 1
    Thanks for the answer. When the device is locked, it won't show any buttons....... so what is the default action that takes place. Even my app is not receiving the delegate "didReceiveRemoteNotification". – Satyam Nov 04 '11 at 14:19
  • That's not true (now). You can see buttons and when you hit one, you'll have to hit your code to advance. – EJ Campbell Sep 29 '15 at 04:05
1

Check out the docs -- as you can send the name of the "open app" button in the push notification payload. Here's apples take on it

extempl
  • 2,638
  • 22
  • 34
theiOSDude
  • 1,410
  • 1
  • 18
  • 34
  • http://developer.apple.com/library/ios/#documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/ApplePushService/ApplePushService.html – theiOSDude May 31 '11 at 15:47