NMPushManager Class Reference
| 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
-
+ deviceTokenReturns the NSString representation of the ‘deviceToken’, is given by APNS in the delegate method application:didRegisterForRemoteNotificationsWithDeviceToken:.
-
+ registerWithCompletionHandler:Registers the device to Netmera for push notifications on the background thread.
-
+ registerWithDeviceDetail:completionHandler:Registers the device with the related attributes, namely tag, customDictionary and location, on the background thread.
-
+ unregisterWithCompletionHandler:Unregisters the device completely from Netmera for push notifications on the background thread.
-
+ unregisterWithDeviceDetail:completionHandler:Unregisters the device from the tags that just set on the given NMDeviceDetail object on the background thread.
-
+ getDeviceTagsWithCompletionHandler:Returns all tags registered to your application on the background thread.
-
+ isRichPushReceivedShows that the receiving push notification is rich or standard.
-
+ richPushCompletionHandlerReturns the block which is executed after a rich push notification is displayed on the device.
-
+ setRichPushCompletionHandler:Sets the block which is executed on completion of display of a rich push notification.
-
+ 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.
-
+ beginIgnoringRichPushesMethod which makes Netmera to ignore received rich pushes when application is on the foreground so that rich pushes does NOT interrupt users' actions.
-
+ endIgnoringRichPushesMethod 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.
-
+ clearPushInboxMethod that removes push inbox controller from memory.
-
+ clearRichPushMethod that removes rich push controller from memory. It’s called when push inbox is disabled.
-
+ loadingHUDReturns the indicator object used for the process of the loading of a rich push notification and push inbox.
-
+ setLoadingHUD:Sets the indicator object used for the process of the loading of a rich push notification and push inbox.
-
+ checkAvailabilityControls the availability of a rich push notification to show. Existance of internet connection is considered in the scope of availability.
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)beginIgnoringRichPushesDiscussion
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.hcheckAvailability
Controls the availability of a rich push notification to show. Existance of internet connection is considered in the scope of availability.
+ (BOOL)checkAvailabilityReturn 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.hclearPushInbox
Method that removes push inbox controller from memory.
+ (void)clearPushInboxDiscussion
Method that removes push inbox controller from memory.
Declared In
NMPushManager.hclearRichPush
Method that removes rich push controller from memory. It’s called when push inbox is disabled.
+ (void)clearRichPushDiscussion
Method that removes rich push controller from memory. It’s called when push inbox is disabled.
Declared In
NMPushManager.hdeviceToken
Returns the NSString representation of the ‘deviceToken’, is given by APNS in the delegate method application:didRegisterForRemoteNotificationsWithDeviceToken:.
+ (NSString *)deviceTokenDiscussion
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.hendIgnoringRichPushes
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)endIgnoringRichPushesDiscussion
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.hgetDeviceTagsWithCompletionHandler:
Returns all tags registered to your application on the background thread.
+ (void)getDeviceTagsWithCompletionHandler:(void ( ^ ) ( NSArray *tags , NSError *error ))handlerParameters
- 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.hisRichPushReceived
Shows that the receiving push notification is rich or standard.
+ (BOOL)isRichPushReceivedReturn 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.hloadingHUD
Returns the indicator object used for the process of the loading of a rich push notification and push inbox.
+ (NMProgressHUD *)loadingHUDReturn 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.hpresentPushInboxFromController:
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 *)parentControllerParameters
- 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.hregisterWithCompletionHandler:
Registers the device to Netmera for push notifications on the background thread.
+ (void)registerWithCompletionHandler:(void ( ^ ) ( BOOL deviceDidRegister , NSError *error ))handlerParameters
- 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.hregisterWithDeviceDetail: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 ))handlerParameters
- 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.hrichPushCompletionHandler
Returns the block which is executed after a rich push notification is displayed on the device.
+ (RichPushCompletionHandler)richPushCompletionHandlerReturn 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.hsetLoadingHUD:
Sets the indicator object used for the process of the loading of a rich push notification and push inbox.
+ (void)setLoadingHUD:(NMProgressHUD *)progressHUDParameters
- 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.hsetRichPushCompletionHandler:
Sets the block which is executed on completion of display of a rich push notification.
+ (void)setRichPushCompletionHandler:(RichPushCompletionHandler)handlerParameters
- 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.hunregisterWithCompletionHandler:
Unregisters the device completely from Netmera for push notifications on the background thread.
+ (void)unregisterWithCompletionHandler:(void ( ^ ) ( BOOL deviceDidUnregister , NSError *error ))handlerParameters
- 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.hunregisterWithDeviceDetail: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 ))handlerParameters
- 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