NetmeraPush Class Reference
| Inherits from | BasePush : NSObject |
| Declared in | NetmeraPush.h NetmeraPush.m |
Overview
NetmeraPush class is used to send push notifications into ANDROID and IOS devices from objective-c code.
NetmeraPush push = [[NetmeraPush alloc] initWithMessage:@“Hello, World!” withDeviceGroups:nil isSendToIOS:YES isSendToAndroid:YES];
[push sendNotificationInBackgroundWithBlock:^(NSError error, NSMutableDictionary *pushInfoDict) {
NSLog(@“ios; %@”, [pushInfoDict objectForKey:IOS_NAME_KEY]);//IOS_NAME_KEY = IOS
NSLog(@“android; %@”, [pushInfoDict objectForKey:ANDROID_NAME_KEY]);//ANDROID_NAME_KEY = Android
}];
Tasks
-
isSendToIOSYES if you want to send your push notification to IOs devices
property -
isSendToAndroidYES if you want to send your push notification to Android devices
property -
– initWithMessage:withDeviceGroups:isSendToIOS:isSendToAndroid:Constractor method that you can easily create instance of NetmeraPush object with push message and its device groups and target mobile operating systems
-
– sendNotificationWithError:Sends notification to IOs and/or Android devices.
-
– sendNotificationInBackgroundSends notification to IOs and/or Android devices in the background thread.
-
– sendNotificationInBackgroundWithBlock:Sends notification to IOs and/or Android devices in the background thread.
-
– sendNotificationInBackgroundWithTarget:selector:Sends notification to IOs and/or Android devices in the background thread.
Properties
Instance Methods
initWithMessage:withDeviceGroups:isSendToIOS:isSendToAndroid:
Constractor method that you can easily create instance of NetmeraPush object with push message and its device groups and target mobile operating systems
- (id)initWithMessage:(NSString *)message withDeviceGroups:(NSArray *)deviceGroups isSendToIOS:(BOOL)isSendToIOS isSendToAndroid:(BOOL)isSendToAndroidParameters
- message
Body of your 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
Constractor method that you can easily create instance of NetmeraPush object with push message and its device groups and target mobile operating systems
Declared In
NetmeraPush.hsendNotificationInBackground
Sends notification to IOs and/or Android devices in the background thread.
- (void)sendNotificationInBackgroundDiscussion
Sends notification to IOs and/or Android devices in the background thread.
Declared In
NetmeraPush.hsendNotificationInBackgroundWithBlock:
Sends notification to IOs and/or Android devices in the background thread.
- (void)sendNotificationInBackgroundWithBlock:(void ( ^ ) ( NSError *error , NSMutableDictionary *pushInfoDict ))blockParameters
- block
The block to execute. The block should have the following argument signature: (NSError error, NetmeraPushInfo pushInfo)
Discussion
Sends notification to IOs and/or Android devices in the background thread.
Declared In
NetmeraPush.hsendNotificationInBackgroundWithTarget:selector:
Sends notification to IOs and/or Android devices in the background thread.
- (void)sendNotificationInBackgroundWithTarget:(id)target selector:(SEL)selectorParameters
- target
The object to call selector on.
- selector
The selector to call. It should have the following signature: (void) callBackSendNotificationWithError:(NSError )error pushInfoList:(NSMutableDictionary )infoList
Discussion
Sends notification to IOs and/or Android devices in the background thread.
Declared In
NetmeraPush.hsendNotificationWithError:
Sends notification to IOs and/or Android devices.
- (NSMutableDictionary *)sendNotificationWithError:(NSError **)errorParameters
- 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/or Android devices.
Declared In
NetmeraPush.h