Inherits from NSObject
Declared in NMPushManager.h
NMPushManager.m

Overview

NMPushManager class manages push notification registration and handling process.

Tasks

Other Methods

Push Registration

Class Methods

beginIgnoringRichPushes

Method which makes Netmera to ignore received rich pushes when application is on the foreground so that rich pushes does NOT interrupt users' actions.

+ (void)beginIgnoringRichPushes

Discussion

Method which makes Netmera to ignore received rich pushes when application is on the foreground so that rich pushes does NOT interrupt users' actions.

Warning: If you call [NMPushManager beginIgnoringRichPushes] method in your code, received rich pushes during foreground state will be ignored by Netmera, and won’t be shown to user, until [NMPushManager endIgnoringRichPushes] method is called.

Declared In

NMPushManager.h

checkAvailability

Controls the availability of a rich push notification to show. Existance of internet connection is considered in the scope of availability.

+ (BOOL)checkAvailability

Return Value

availability of rich push notification.

Discussion

Controls the availability of a rich push notification to show. Existance of internet connection is considered in the scope of availability.

Declared In

NMPushManager.h

deviceToken

Returns the hexadecimal string representation of the ‘deviceToken’.

+ (NSString *)deviceToken

Discussion

Returns the hexadecimal string representation of the ‘deviceToken’.

Declared In

NMPushManager.h

endIgnoringRichPushes

Method which makes Netmera to stop ignoring received rich pushes when application is on the foreground so that rich pushes will be shown to user after this call.

+ (void)endIgnoringRichPushes

Discussion

Method which makes Netmera to stop ignoring received rich pushes when application is on the foreground so that rich pushes will be shown to user after this call.

Declared In

NMPushManager.h

getDeviceTagsWithCompletionHandler:

Returns all tags registered for device.

+ (void)getDeviceTagsWithCompletionHandler:(void ( ^ ) ( NSArray *tags , NSError *error ))handler

Parameters

handler

The block to execute when the fetch of the tags is completed.

Discussion

Returns all tags registered for device.

You should beware that tag list returned from this method contains the tags other devices registered to, not just the regarding device.

Declared In

NMPushManager.h

loadingHUD

Returns the indicator object used for the process of the loading of a rich push notification and push inbox.

+ (NMProgressHUD *)loadingHUD

Return Value

NMProgressHUD object that is set for the loading indicator.

Discussion

Returns the indicator object used for the process of the loading of a rich push notification and push inbox.

Declared In

NMPushManager.h

presentPushInboxFromController:

Use this method to manually present push inbox on your view controller hierarchy. Push Inbox controller will be presented on given controller as a modalviewcontroller.

+ (void)presentPushInboxFromController:(UIViewController *)parentController

Parameters

parentController

The controller object which will present push inbox modally.

Discussion

Use this method to manually present push inbox on your view controller hierarchy. Push Inbox controller will be presented on given controller as a modalviewcontroller.

Declared In

NMPushManager.h

registerWithCompletionHandler:

Registers the device to Netmera for push notifications.

+ (void)registerWithCompletionHandler:(void ( ^ ) ( BOOL deviceDidRegister , NSError *error ))handler

Parameters

handler

The block to execute when the registration of the device is completed.

Discussion

Registers the device to Netmera for push notifications.

Declared In

NMPushManager.h

registerWithDeviceDetail:completionHandler:

Registers the device with the related attributes – namely tag, customDictionary and location.

+ (void)registerWithDeviceDetail:(NMDeviceDetail *)deviceDetail completionHandler:(void ( ^ ) ( BOOL deviceDidRegister , NSError *error ))handler

Parameters

deviceDetail

The NMDeviceDetail object which contains the relevant attributes.

handler

The block to execute when the registration of the device with the given attributes is completed.

Discussion

Registers the device with the related attributes – namely tag, customDictionary and location.

Declared In

NMPushManager.h

setDelegate:

You can set any object that conforms to NMPushManagerDelegate protocol as the delegate for push notification events. By default, your application’s “AppDelegate” object is the delegate for events about push notifications sent from Netmera.

+ (void)setDelegate:(id<NMPushManagerDelegate>)delegate

Discussion

You can set any object that conforms to NMPushManagerDelegate protocol as the delegate for push notification events. By default, your application’s “AppDelegate” object is the delegate for events about push notifications sent from Netmera.

Declared In

NMPushManager.h

setEnabledUserNotificationTypes:

Sets enabled user notification types for push notifications.

+ (void)setEnabledUserNotificationTypes:(UIUserNotificationType)type

Parameters

type

A UIUserNotificationType enum.

Discussion

Sets enabled user notification types for push notifications.

Declared In

NMPushManager.h

setLoadingHUD:

Sets the indicator object used for the process of the loading of a rich push notification and push inbox.

+ (void)setLoadingHUD:(NMProgressHUD *)progressHUD

Parameters

progressHUD

Configured loading indicator.

Discussion

Sets the indicator object used for the process of the loading of a rich push notification and push inbox.

For a custom loading indicator, you should configure NMProgressHUD object. It offers a rich interface. By default, a basic design of NMProgressHUD is used.

Declared In

NMPushManager.h

setUserNotificationCategories:

Sets the set of UIUserNotificationCategory objects for interactive notifications.

+ (void)setUserNotificationCategories:(NSSet *)categories

Parameters

categories

The set containing UIUserNotificationCategory objects.

Discussion

Sets the set of UIUserNotificationCategory objects for interactive notifications.

This method internally creates a UIUserNotificationSettings object having given categories, and registers the device to this settings object using registerUserNotificationSettings: method.

Warning: If any of the objects does NOT belong UIUserNotificationCategory class, method does NOT register the given category set.

Declared In

NMPushManager.h

unregisterWithCompletionHandler:

Unregisters the device completely from Netmera for push notifications.

+ (void)unregisterWithCompletionHandler:(void ( ^ ) ( BOOL deviceDidUnregister , NSError *error ))handler

Parameters

handler

The block to execute when the unregistration of the device is completed.

Discussion

Unregisters the device completely from Netmera for push notifications.

Declared In

NMPushManager.h

unregisterWithDeviceDetail:completionHandler:

Unregisters the device from the tags that just set on the given NMDeviceDetail object.

+ (void)unregisterWithDeviceDetail:(NMDeviceDetail *)deviceDetail completionHandler:(void ( ^ ) ( BOOL deviceDidUnregister , NSError *error ))handler

Parameters

deviceDetail

The NMDeviceDetail object which contains the tags that will be unregistered.

handler

The block to execute when the unregistration of the device from the given tags is completed.

Discussion

Unregisters the device from the tags that just set on the given NMDeviceDetail object.

Declared In

NMPushManager.h