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

Properties

isSendToAndroid

YES if you want to send your push notification to Android devices

@property BOOL isSendToAndroid

Discussion

YES if you want to send your push notification to Android devices

Declared In

NetmeraPush.h

isSendToIOS

YES if you want to send your push notification to IOs devices

@property BOOL isSendToIOS

Discussion

YES if you want to send your push notification to IOs devices

Declared In

NetmeraPush.h

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)isSendToAndroid

Parameters

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.h

sendNotificationInBackground

Sends notification to IOs and/or Android devices in the background thread.

- (void)sendNotificationInBackground

Discussion

Sends notification to IOs and/or Android devices in the background thread.

Declared In

NetmeraPush.h

sendNotificationInBackgroundWithBlock:

Sends notification to IOs and/or Android devices in the background thread.

- (void)sendNotificationInBackgroundWithBlock:(void ( ^ ) ( NSError *error , NSMutableDictionary *pushInfoDict ))block

Parameters

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.h

sendNotificationInBackgroundWithTarget:selector:

Sends notification to IOs and/or Android devices in the background thread.

- (void)sendNotificationInBackgroundWithTarget:(id)target selector:(SEL)selector

Parameters

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.h

sendNotificationWithError:

Sends notification to IOs and/or Android devices.

- (NSMutableDictionary *)sendNotificationWithError:(NSError **)error

Parameters

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