KGNotificationPayload Class Reference
Inherits from | NSObject |
Declared in | KGNotificationPayload.h |
Overview
KGNotificationPayload represents a concrete class that is used to create a JSON payload to be delivered to Apple Push Notification Service(APNS). Currently, only alert and sound notifications are supported.
Tasks
-
– initWithAlert:
Creates an instance of KGNotificationPayload which includes an alert notification.
-
– initWithAlert:sound:
Creates an instance of KGNotificationPayload which includes an alert notification with sound.
-
– alertNotification
Returns the alert notification.
-
– setAlertNotification:
Sets the alert notification.
-
– soundNotification
Returns the sound notification.
-
– setSoundNotification:
Sets the sound notification.
Instance Methods
alertNotification
Returns the alert notification.
- (id<KGAlertNotification>)alertNotification
Return Value
KGAlertNotification object
Declared In
KGNotificationPayload.h
initWithAlert:
Creates an instance of KGNotificationPayload which includes an alert notification.
- (id)initWithAlert:(id<KGAlertNotification>)alert
Parameters
- alert
KGAlertNotification representing the alert to be rendered when the notification is received
Return Value
id instance of KGNotificationPayload class
Declared In
KGNotificationPayload.h
initWithAlert:sound:
Creates an instance of KGNotificationPayload which includes an alert notification with sound.
- (id)initWithAlert:(id<KGAlertNotification>)alert sound:(id<KGSoundNotification>)sound
Parameters
- alert
KGAlertNotification representing the alert to be rendered when the notification is received
- sound
KGSoundNotification representing the sound to be played when the notification is received
Return Value
id instance of KGNotificationPayload class
Declared In
KGNotificationPayload.h
setAlertNotification:
Sets the alert notification.
- (void)setAlertNotification:(id<KGAlertNotification>)alert
Parameters
- alert
KGAlertNotification object representing an alert
Declared In
KGNotificationPayload.h
setSoundNotification:
Sets the sound notification.
- (void)setSoundNotification:(id<KGSoundNotification>)sound
Parameters
- sound
KGSoundNotification object representing a sound
Declared In
KGNotificationPayload.h
soundNotification
Returns the sound notification.
- (id<KGSoundNotification>)soundNotification
Return Value
KGSoundNotification object
Declared In
KGNotificationPayload.h