"alert" contents in Push Notification

Discussion in 'iOS Programming' started by Narendar Singh, Nov 29, 2012.

  1. Narendar Singh macrumors member

    Narendar Singh

    Joined:
    Jun 22, 2012
    Location:
    INDIA
    #1
    My application is using Push Notification.

    I have to send push notification in following format which is # separated

    Code#Type#MessageToDisplay

    When device receives the push notification it displays the above message with Close and View button.

    I want to display only MessageToDisplay and other two values are for my internal use.

    How to can I do this?

    I this possible to send Cody#Type in some other key?
     
  2. Reason077 macrumors 68000

    Reason077

    Joined:
    Aug 14, 2007
    #2
    Yes. You can pass custom key/value pairs as part of the JSON payload you send to the push notification service.

    See the documentation for examples:

    http://developer.apple.com/library/...ionsPG/ApplePushService/ApplePushService.html

    Your custom data is passed to your app in the UIApplicationDelegate application:didReceiveRemoteNotification: userInfo parameter.
     
  3. Narendar Singh thread starter macrumors member

    Narendar Singh

    Joined:
    Jun 22, 2012
    Location:
    INDIA
    #3
    Worked for me... thanks...
     

Share This Page