AWSPinpointNotificationManager Class Reference

Inherits from NSObject
Declared in AWSPinpointNotificationManager.h
AWSPinpointNotificationManager.m

+ isNotificationEnabled

Returns a Boolean indicating whether the app is currently registered for remote notifications.

+ (BOOL)isNotificationEnabled

Return Value

BOOL YES if the app is registered for remote notifications and received its device token or NO if registration has not occurred, has failed, or has been denied by the user.

Declared In

AWSPinpointNotificationManager.h

– interceptDidFinishLaunchingWithOptions:

Intercepts the - application:didFinishLaunchingWithOptions: application delegate.

- (BOOL)interceptDidFinishLaunchingWithOptions:(nullable NSDictionary *)launchOptions

Parameters

launchOptions

A dictionary indicating the reason the app was launched (if any). The contents of this dictionary may be empty in situations where the user launched the app directly. For information about the possible keys in this dictionary and how to handle them.

Discussion

Targeting must intercept this callback in order to report campaign analytics correctly.

Declared In

AWSPinpointNotificationManager.h

– interceptDidRegisterForRemoteNotificationsWithDeviceToken:

Intercepts the - application:didRegisterForRemoteNotificationsWithDeviceToken: application delegate.

- (void)interceptDidRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken

Parameters

deviceToken

A token that identifies the device to APNs.

Discussion

Targeting must intercept this callback in order to report campaign analytics correctly.

Declared In

AWSPinpointNotificationManager.h

– interceptDidReceiveRemoteNotification:fetchCompletionHandler:

Intercepts the - application:didReceiveRemoteNotification:fetchCompletionHandler: application delegate.

- (void)interceptDidReceiveRemoteNotification:(NSDictionary *)userInfo fetchCompletionHandler:(void ( ^ ) ( UIBackgroundFetchResult result ))handler

Parameters

userInfo

A dictionary that contains information related to the remote notification, potentially including a badge number for the app icon, an alert sound, an alert message to display to the user, a notification identifier, and custom data. The provider originates it as a JSON-defined dictionary that iOS converts to an NSDictionary object; the dictionary may contain only property-list objects plus NSNull.

handler

The block to execute when the download operation is complete. When calling this block, pass in the fetch result value that best describes the results of your download operation. You must call this handler and should do so as soon as possible. For a list of possible values, see the UIBackgroundFetchResult type.

Discussion

Targeting must intercept this callback in order to report campaign analytics correctly.

Declared In

AWSPinpointNotificationManager.h

– interceptDidReceiveRemoteNotification:fetchCompletionHandler:shouldHandleNotificationDeepLink:

Intercepts the - application:didReceiveRemoteNotification:fetchCompletionHandler:shouldHandleNotificationDeepLink: application delegate.

- (void)interceptDidReceiveRemoteNotification:(NSDictionary *)userInfo fetchCompletionHandler:(void ( ^ ) ( UIBackgroundFetchResult result ))handler shouldHandleNotificationDeepLink:(BOOL)handleDeepLink

Parameters

userInfo

A dictionary that contains information related to the remote notification, potentially including a badge number for the app icon, an alert sound, an alert message to display to the user, a notification identifier, and custom data. The provider originates it as a JSON-defined dictionary that iOS converts to an NSDictionary object; the dictionary may contain only property-list objects plus NSNull.

handler

The block to execute when the download operation is complete. When calling this block, pass in the fetch result value that best describes the results of your download operation. You must call this handler and should do so as soon as possible. For a list of possible values, see the UIBackgroundFetchResult type.

handleDeepLink

Whether or not notification manager should attempt to open the remote notification deeplink, if present

Discussion

Targeting must intercept this callback in order to report campaign analytics correctly. Optionally specify ‘shouldHandleNotificationDeepLink’ to control whether or not the notification manager should attempt to open the remote notification deeplink, if present.

Declared In

AWSPinpointNotificationManager.h