OMCNotifications Class Reference

Inherits from OMCServiceProxy : NSObject
Declared in OMCNotifications.h

Overview

This class is used to both register and deregister the device with MCS for push notifications.

Note the methods provided here assume that the app has already registered the desired notification types for the app with iOS, and has received the device token bytes via the callback method for this registration. See the code in the AppDelegate in the GettingStartediOS or GettingStartedSwift for sample code to make these calls.

– registerForNotifications:onSuccess:onError:

Registers the device token with MCS. This is an asynchronous call.

- (void)registerForNotifications:(NSData *)deviceToken onSuccess:(OMC_Notifications_SuccessBlock)successCallback onError:(OMC_Notifications_ErrorBlock)errorCallback

Parameters

deviceToken

Device token of iOS device.

successCallback

(optional) The block to be called on success. The format of the callback is ^(NSHTTPURLResponse*).

errorCallback

(optional) The block to be called on error. The format of the callback is ^(NSError*).

Declared In

OMCNotifications.h

– deregisterForNotifications:onSuccess:onError:

De-registers the device token with MCS. This is an asynchronous call.

- (void)deregisterForNotifications:(NSData *)deviceToken onSuccess:(OMC_Notifications_SuccessBlock)successCallback onError:(OMC_Notifications_ErrorBlock)errorCallback

Parameters

deviceToken

Device token of iOS device.

successCallback

(optional) The block to be called on success.

errorCallback

(optional) The block to be called on error.

Declared In

OMCNotifications.h