MFPPush Class Reference
Inherits from | NSObject |
Declared in | MFPPush.h |
MFPPush class provides APIs for functionalities that are supported by the MFP Push Notification SDK
Tasks
+ sharedInstance
– initialize
– initialize:
– isPushSupported
– getSubscriptions:
– getTags:
– registerDevice:completionHandler:
– sendDeviceToken:
– subscribe:completionHandler:
– unsubscribe:completionHandler:
– unregisterDevice:
Class Methods
sharedInstance
This method creates the singleton instance of MFPPush
+ (MFPPush *)sharedInstance
Return Value
The instance of the initialized MFPPush
Declared In
MFPPush.h
Instance Methods
getSubscriptions:
This method retrieves all the subscriptions of the device
- (void)getSubscriptions:(void ( ^ ) ( WLResponse *response , NSError *error ))completionHandler
Parameters
- completionHandler
-
- returns a WLResponse or NSError
Declared In
MFPPush.h
getTags:
This method retrieves all the available tags of the application
- (void)getTags:(void ( ^ ) ( WLResponse *response , NSError *error ))completionHandler
Parameters
- completionHandler
-
- returns a WLResponse or NSError
Declared In
MFPPush.h
initialize
This method initializes the MFPPush instance
- (void)initialize
Declared In
MFPPush.h
initialize:
This method initializes the MFPPush instance
- (void)initialize:(NSTimeInterval)timeout
Declared In
MFPPush.h
isPushSupported
This method checks whether push notification is supported.
- (BOOL)isPushSupported
Declared In
MFPPush.h
registerDevice:completionHandler:
This method registers the device with the push service
- (void)registerDevice:(NSDictionary *)options completionHandler:(void ( ^ ) ( WLResponse *response , NSError *error ))completionHandler
Parameters
- options
-
Mandatory. iOS notification options { phoneNumber: String, alert: boolean, badge: boolean, sound: boolean, categories: NSSet } where phoneNumber - Phone number to receive the SMS based notifications alert - To enable displaying alert messages badge - To enable badge icons sound - To enable playing sound categories - iOS8 interactive notification categories for example UIMutableUserNotificationAction *acceptAction = [[UIMutableUserNotificationAction alloc] init]; acceptAction.identifier = @“OK”; acceptAction.title = @“OK”;
UIMutableUserNotificationAction *rejetAction = [[UIMutableUserNotificationAction alloc] init]; rejetAction.identifier = @"NOK"; rejetAction.title = @"NOK"; UIMutableUserNotificationCategory *category = [[UIMutableUserNotificationCategory alloc] init]; category.identifier = @"poll"; [category setActions:@[acceptAction,rejetAction] forContext:UIUserNotificationActionContextDefault]; [category setActions:@[acceptAction,rejetAction] forContext:UIUserNotificationActionContextMinimal]; NSDictionary *options = @{
@“phoneNumber”: @“999999999”, @“alert”: @true, @“badge”: @true, @“sound”: @true, @“categories”: [NSSet setWithObject:category] }
- completionHandler
-
- returns a WLResponse or NSError
Declared In
MFPPush.h
sendDeviceToken:
This method sends the device token to be registered with the push service
- (void)sendDeviceToken:(NSData *)deviceToken
Parameters
- deviceToken
-
- the device token received from APNS.
Declared In
MFPPush.h
subscribe:completionHandler:
This method subscribes the device to the given tags
- (void)subscribe:(NSArray *)tagsArray completionHandler:(void ( ^ ) ( WLResponse *response , NSError *error ))completionHandler
Parameters
- tagsArray
-
- the tag array
- completionHandler
-
- returns a WLResponse or NSError
Declared In
MFPPush.h
unregisterDevice:
This method unregisters the device from the push service
- (void)unregisterDevice:(void ( ^ ) ( WLResponse *response , NSError *error ))completionHandler
Parameters
- completionHandler
-
- returns a WLResponse or NSError
Declared In
MFPPush.h
unsubscribe:completionHandler:
This method unsubscribes the device from the given tags
- (void)unsubscribe:(NSArray *)tagsArray completionHandler:(void ( ^ ) ( WLResponse *response , NSError *error ))completionHandler
Parameters
- tagsArray
-
- the tag array
- completionHandler
-
- returns a WLResponse or NSError
Declared In
MFPPush.h
© 2017 IBM. All rights reserved. (Last updated: 2017-06-21)
Generated by appledoc 2.2 (build 963).