Inherits from NSObject
Declared in NMPushManager.h
NMPushManager.m

Overview

NMPushManager class is used to manage all issues about push notifications. All issues mean registering to and unregistering from ‘Push Notification’s, getting the registered device tags and also rich push handling mechanism. Even if you are able to use these methods whenever you want, you should be aware of the fact that Netmera iOS SDK v2.0 and after versions already will handle all these issues automatically while there is no need to write any code except the extreme scenarios after adding the SDK to your application.

Tasks

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.

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

clearPushInbox

Method that removes push inbox controller from memory.

+ (void)clearPushInbox

Discussion

Method that removes push inbox controller from memory.

Declared In

NMPushManager.h

clearRichPush

Method that removes rich push controller from memory. It’s called when push inbox is disabled.

+ (void)clearRichPush

Discussion

Method that removes rich push controller from memory. It’s called when push inbox is disabled.

Declared In

NMPushManager.h

deviceToken

Returns the NSString representation of the ‘deviceToken’, is given by APNS in the delegate method application:didRegisterForRemoteNotificationsWithDeviceToken:.

+ (NSString *)deviceToken

Discussion

Returns the NSString representation of the ‘deviceToken’, is given by APNS in the delegate method application:didRegisterForRemoteNotificationsWithDeviceToken:.

If the device is requested to be registered in the application code, i.e. the situation that requires tag registration, besides application:didRegisterForRemoteNotificationsWithDeviceToken: method, this value is used automatically.

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 to your application on the background thread.

+ (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 to your application on the background thread.

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

isRichPushReceived

Shows that the receiving push notification is rich or standard.

+ (BOOL)isRichPushReceived

Return Value

The boolean value which represents type of the coming push notification handled by SDK automatically.

Discussion

Shows that the receiving push notification is rich or standard.

Netmera iOS SDK v2.0 and after versions will handle the receiving rich push notifications automatically. There is no need to write a single line code for present rich push notification. However, you want to make some changes in your application independent from the SDK or showing standard push notifications within your app style; therefore, you can be aware of the type of the coming rich push notification calling this method.

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 on the background thread.

+ (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 on the background thread.

Declared In

NMPushManager.h

registerWithDeviceDetail:completionHandler:

Registers the device with the related attributes, namely tag, customDictionary and location, on the background thread.

+ (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, on the background thread.

Declared In

NMPushManager.h

richPushCompletionHandler

Returns the block which is executed after a rich push notification is displayed on the device.

+ (RichPushCompletionHandler)richPushCompletionHandler

Return Value

The block to be executed when showing the rich push notification is completed.

Discussion

Returns the block which is executed after a rich push notification is displayed on the device.

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

setRichPushCompletionHandler:

Sets the block which is executed on completion of display of a rich push notification.

+ (void)setRichPushCompletionHandler:(RichPushCompletionHandler)handler

Parameters

handler

The block to be executed when showing the rich push notification is completed.

Discussion

Sets the block which is executed on completion of display of a rich push notification.

Declared In

NMPushManager.h

unregisterWithCompletionHandler:

Unregisters the device completely from Netmera for push notifications on the background thread.

+ (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 on the background thread.

Declared In

NMPushManager.h

unregisterWithDeviceDetail:completionHandler:

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

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

Parameters

deviceDetail

The NMDeviceDetail object which contains the tags that are unregistered from.

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 on the background thread.

Declared In

NMPushManager.h