Conforms to NSObject
Declared in UAPush.h

Overview

Protocol to be implemented by push notification clients. All methods are optional.

Instance Methods

displayLocalizedNotificationAlert:

Called when an alert notification is received in the foreground with additional localization info.

- (void)displayLocalizedNotificationAlert:(NSDictionary *)alertDict

Parameters

alertDict

a dictionary containing the alert and localization info

Declared In

UAPush.h

displayNotificationAlert:

Called when an alert notification is received in the foreground.

- (void)displayNotificationAlert:(NSString *)alertMessage

Parameters

alertMessage

a simple string to be displayed as an alert

Declared In

UAPush.h

handleBadgeUpdate:

Called when a push notification is received in the foreground with a badge number.

- (void)handleBadgeUpdate:(NSInteger)badgeNumber

Parameters

badgeNumber

The badge number to display

Declared In

UAPush.h

launchedFromNotification:

Called when the app is started or resumed because a user opened a notification. Overridden by launchedFromNotification:fetchCompletionHandler.

- (void)launchedFromNotification:(NSDictionary *)notification

Parameters

notification

The notification dictionary.

Declared In

UAPush.h

launchedFromNotification:actionIdentifier:completionHandler:

Called when the app is started from a user notification action button with foreground activation mode.

- (void)launchedFromNotification:(NSDictionary *)notification actionIdentifier:(NSString *)identifier completionHandler:(void ( ^ ) ( ))completionHandler

Parameters

notification

The notification dictionary.

identifier

The user notification action identifier.

completionHandler

Should be called as soon as possible.

Declared In

UAPush.h

launchedFromNotification:fetchCompletionHandler:

Called when the app is started or resumed because a user opened a notification for applications with the “remote-notification” background mode.

- (void)launchedFromNotification:(NSDictionary *)notification fetchCompletionHandler:(void ( ^ ) ( UIBackgroundFetchResult result ))completionHandler

Parameters

notification

The notification dictionary.

completionHandler

Should be called with a UIBackgroundFetchResult as soon as possible, so the system can accurately estimate its power and data cost.

Declared In

UAPush.h

playNotificationSound:

Called when a push notification is received in the foreground with a sound associated

- (void)playNotificationSound:(NSString *)soundFilename

Parameters

soundFilename

The sound file to play or default for the standard notification sound. This file must be included in the application bundle.

Declared In

UAPush.h

receivedBackgroundNotification:

Called when a push notification is received while the app is running in the background for applications with the “remote-notification” background mode. Overridden by receivedBackgroundNotification:fetchCompletionHandler.

- (void)receivedBackgroundNotification:(NSDictionary *)notification

Parameters

notification

The notification dictionary.

Declared In

UAPush.h

receivedBackgroundNotification:actionIdentifier:completionHandler:

Called when the app is started from a user notification action button with background activation mode.

- (void)receivedBackgroundNotification:(NSDictionary *)notification actionIdentifier:(NSString *)identifier completionHandler:(void ( ^ ) ( ))completionHandler

Parameters

notification

The notification dictionary.

identifier

The user notification action identifier.

completionHandler

Should be called as soon as possible.

Declared In

UAPush.h

receivedBackgroundNotification:fetchCompletionHandler:

Called when a push notification is received while the app is running in the background for applications with the “remote-notification” background mode.

- (void)receivedBackgroundNotification:(NSDictionary *)notification fetchCompletionHandler:(void ( ^ ) ( UIBackgroundFetchResult result ))completionHandler

Parameters

notification

The notification dictionary.

completionHandler

Should be called with a UIBackgroundFetchResult as soon as possible, so the system can accurately estimate its power and data cost.

Declared In

UAPush.h

receivedForegroundNotification:

Called when a push notification is received while the app is running in the foreground. Overridden by receivedForegroundNotification:fetchCompletionHandler.

- (void)receivedForegroundNotification:(NSDictionary *)notification

Parameters

notification

The notification dictionary.

Declared In

UAPush.h

receivedForegroundNotification:fetchCompletionHandler:

Called when a push notification is received while the app is running in the foreground for applications with the “remote-notification” background mode.

- (void)receivedForegroundNotification:(NSDictionary *)notification fetchCompletionHandler:(void ( ^ ) ( UIBackgroundFetchResult result ))completionHandler

Parameters

notification

The notification dictionary.

completionHandler

Should be called with a UIBackgroundFetchResult as soon as possible, so the system can accurately estimate its power and data cost.

Declared In

UAPush.h