NetmeraPushService Class Reference
| Inherits from | NSObject |
| Declared in | NetmeraPushService.h NetmeraPushService.m |
Overview
This is the main class to manage push notifications in Netmera. With the help of this class, you can register/unregister devices to get notification.
Tasks
-
+ sendNotificationWithMessage:withError:Sends notification to IOs and Android devices.
-
+ sendNotificationWithMessage:withDeviceGroups:withError:Sends notification to IOs and Android devices.
-
+ sendNotificationWithMessage:withDeviceGroups:isSendToIOS:isSendToAndroid:withError:Sends notification to IOs and Android devices.
-
+ sendNotificationInBackgroundWithMessage:Sends notification to IOs and Android devices in backgroud thread.
-
+ sendNotificationInBackgroundWithMessage:withDeviceGroups:isSendToIOS:isSendToAndroid:Sends notification to IOs and Android devices in backgroud thread.
-
+ sendNotificationInBackgroundWithBlock:withMessage:withDeviceGroups:isSendToIOS:isSendToAndroid:withError:Sends notification to IOs and Android devices in backgroud thread.
-
+ unRegisterWithToken:Unregisters device.
-
+ unRegisterInBackgroundWithToken:Unregisters device in the background thread and not callback any
-
+ unRegisterInBackgroundWithToken:withBlock:Unregisters device in the background thread
-
+ registerWithToken:Registers the device into to the server.
-
+ registerInBackgroundWithToken:Registers the device into to the server in the background thread and not callback any
-
+ registerInBackgroundWithToken:withBlock:Unregisters device in the background thread
-
+ getNetmeraDeviceGroupsWithError:Gets all groups of your application’s token list
-
+ unRegisterWithNetmeraDeviceDetail:Unregister any device from any groups.
-
+ unRegisterInBackgroundWithNetmeraDeviceDetail:Unregister any device from any groups in background thread.
-
+ registerWithNetmeraDeviceDetail:Register any device from any groups.
-
+ registerInBackgroundWithNetmeraDeviceDetail:Register any device from any groups in background thread.
-
+ handleNotification:Handles received push notification content and shows a rich push view to user if notification includes a rich push message.
Class Methods
getNetmeraDeviceGroupsWithError:
Gets all groups of your application’s token list
+ (NSArray *)getNetmeraDeviceGroupsWithError:(NSError **)errorParameters
- error
if it cannot access server
Discussion
Gets all groups of your application’s token list
Declared In
NetmeraPushService.hhandleNotification:
Handles received push notification content and shows a rich push view to user if notification includes a rich push message.
+ (BOOL)handleNotification:(NSDictionary *)userInfoParameters
- userInfo
data that comes with the push notification.
Return Value
BOOL Returns YES if notification includes a rich push message. Otherwise, returns NO.
Discussion
Handles received push notification content and shows a rich push view to user if notification includes a rich push message.
Declared In
NetmeraPushService.hregisterInBackgroundWithNetmeraDeviceDetail:
Register any device from any groups in background thread.
+ (void)registerInBackgroundWithNetmeraDeviceDetail:(NetmeraDeviceDetail *)deviceDetailParameters
- deviceDetail
token and deviceGroupList attributes of NetmeraDeviceDetail instance that you created must not be nil.
Discussion
Register any device from any groups in background thread.
Declared In
NetmeraPushService.hregisterInBackgroundWithToken:
Registers the device into to the server in the background thread and not callback any
+ (void)registerInBackgroundWithToken:(NSString *)tokenParameters
- token
application’s deviceToken
Discussion
Registers the device into to the server in the background thread and not callback any
Declared In
NetmeraPushService.hregisterInBackgroundWithToken:withBlock:
Unregisters device in the background thread
+ (void)registerInBackgroundWithToken:(NSString *)token withBlock:(void ( ^ ) ( NSError *error ))blockParameters
- token
application’s deviceToken
- block
The block to execute. The block should have the following argument signature: (NSError *error)
Discussion
Unregisters device in the background thread
Declared In
NetmeraPushService.hregisterWithNetmeraDeviceDetail:
Register any device from any groups.
+ (void)registerWithNetmeraDeviceDetail:(NetmeraDeviceDetail *)deviceDetailParameters
- deviceDetail
token and deviceGroupList attributes of NetmeraDeviceDetail instance that you created must not be nil.
Discussion
Register any device from any groups.
Declared In
NetmeraPushService.hregisterWithToken:
Registers the device into to the server.
+ (void)registerWithToken:(NSString *)tokenParameters
- token
application’s deviceToken
Discussion
Registers the device into to the server.
Declared In
NetmeraPushService.hsendNotificationInBackgroundWithBlock:withMessage:withDeviceGroups:isSendToIOS:isSendToAndroid:withError:
Sends notification to IOs and Android devices in backgroud thread.
+ (void)sendNotificationInBackgroundWithBlock:(void ( ^ ) ( NSError *error , NSMutableDictionary *pushInfoList ))block withMessage:(NSString *)message withDeviceGroups:(NSArray *)deviceGroups isSendToIOS:(BOOL)isSendToIOS isSendToAndroid:(BOOL)isSendToAndroid withError:(NSError **)errorParameters
- block
The block to execute. The block should have the following argument signature: (NSError error, NSMutableDictionary pushInfoList)
- message
Body text of push notification
- deviceGroups
Names of your target group
- isSendToIOS
BOOL parameter if you want to send your push notification to IOs devices
- isSendToAndroid
BOOL parameter if you want to send your push notification to Android devices
Discussion
Sends notification to IOs and Android devices in backgroud thread.
Declared In
NetmeraPushService.hsendNotificationInBackgroundWithMessage:
Sends notification to IOs and Android devices in backgroud thread.
+ (void)sendNotificationInBackgroundWithMessage:(NSString *)messageParameters
- message
Body text of push notification
Discussion
Sends notification to IOs and Android devices in backgroud thread.
Declared In
NetmeraPushService.hsendNotificationInBackgroundWithMessage:withDeviceGroups:isSendToIOS:isSendToAndroid:
Sends notification to IOs and Android devices in backgroud thread.
+ (void)sendNotificationInBackgroundWithMessage:(NSString *)message withDeviceGroups:(NSArray *)deviceGroups isSendToIOS:(BOOL)isSendToIOS isSendToAndroid:(BOOL)isSendToAndroidParameters
- message
Body text of push notification
- deviceGroups
Names of your target group
- isSendToIOS
BOOL parameter if you want to send your push notification to IOs devices
- isSendToAndroid
BOOL parameter if you want to send your push notification to Android devices
Discussion
Sends notification to IOs and Android devices in backgroud thread.
Declared In
NetmeraPushService.hsendNotificationWithMessage:withDeviceGroups:isSendToIOS:isSendToAndroid:withError:
Sends notification to IOs and Android devices.
+ (NSMutableDictionary *)sendNotificationWithMessage:(NSString *)message withDeviceGroups:(NSArray *)deviceGroups isSendToIOS:(BOOL)isSendToIOS isSendToAndroid:(BOOL)isSendToAndroid withError:(NSError **)errorParameters
- message
Body text of push notification
- deviceGroups
Names of your target group
- isSendToIOS
BOOL parameter if you want to send your push notification to IOs devices
- isSendToAndroid
BOOL parameter if you want to send your push notification to Android devices
- error
if it cannot access server
Return Value
NSMutableDictionary include max. two NetmeraPushInfo object with keys “IOS” and “Android”
Discussion
Sends notification to IOs and Android devices.
Declared In
NetmeraPushService.hsendNotificationWithMessage:withDeviceGroups:withError:
Sends notification to IOs and Android devices.
+ (NSMutableDictionary *)sendNotificationWithMessage:(NSString *)message withDeviceGroups:(NSArray *)deviceGroups withError:(NSError **)errorParameters
- message
Body text of push notification
- deviceGroups
Names of your target group
- error
if it cannot access server
Return Value
NSMutableDictionary include max. two NetmeraPushInfo object with keys “IOS” and “Android”
Discussion
Sends notification to IOs and Android devices.
Declared In
NetmeraPushService.hsendNotificationWithMessage:withError:
Sends notification to IOs and Android devices.
+ (NSMutableDictionary *)sendNotificationWithMessage:(NSString *)message withError:(NSError **)errorParameters
- message
Body text of push notification
- error
if it cannot access server
Return Value
NSMutableDictionary include max. two NetmeraPushInfo object with keys “IOS” and “Android”
Discussion
Sends notification to IOs and Android devices.
Declared In
NetmeraPushService.hunRegisterInBackgroundWithNetmeraDeviceDetail:
Unregister any device from any groups in background thread.
+ (void)unRegisterInBackgroundWithNetmeraDeviceDetail:(NetmeraDeviceDetail *)deviceDetailParameters
- deviceDetail
token and deviceGroupList attributes of NetmeraDeviceDetail instance that you created must not be nil.
Discussion
Unregister any device from any groups in background thread.
Declared In
NetmeraPushService.hunRegisterInBackgroundWithToken:
Unregisters device in the background thread and not callback any
+ (void)unRegisterInBackgroundWithToken:(NSString *)tokenParameters
- token
application’s deviceToken
Discussion
Unregisters device in the background thread and not callback any
Declared In
NetmeraPushService.hunRegisterInBackgroundWithToken:withBlock:
Unregisters device in the background thread
+ (void)unRegisterInBackgroundWithToken:(NSString *)token withBlock:(void ( ^ ) ( NSError *error ))blockParameters
- token
application’s deviceToken
- block
The block to execute. The block should have the following argument signature: (NSError *error)
Discussion
Unregisters device in the background thread
Declared In
NetmeraPushService.hunRegisterWithNetmeraDeviceDetail:
Unregister any device from any groups.
+ (void)unRegisterWithNetmeraDeviceDetail:(NetmeraDeviceDetail *)deviceDetailParameters
- deviceDetail
token and deviceGroupList attributes of NetmeraDeviceDetail instance that you created must not be nil.
Discussion
Unregister any device from any groups.
Declared In
NetmeraPushService.h