BMSPushClient
public class BMSPushClient : NSObject
                A singleton that serves as an entry point to IBM Cloud client-Push service communication.
- 
                  
                  
This singleton should be used for all
BMSPushClientactivity.Declaration
Swift
public static let sharedInstance: BMSPushClient 
- 
                  
                  
The required intializer for the
BMSPushClientclass.This method will intialize the BMSPushClient with clientSecret based registration.
Declaration
Swift
public func initializeWithAppGUID(appGUID: String, clientSecret: String)Parameters
clientSecretThe clientSecret of the Push Service
appGUIDThe pushAppGUID of the Push Service
 - 
                  
                  
The required intializer for the
BMSPushClientclass.This method will intialize the BMSPushClient with clientSecret based registration and take in notificationOptions.
Declaration
Swift
public func initializeWithAppGUID(appGUID: String, clientSecret: String, options: BMSPushClientOptions)Parameters
clientSecretThe clientSecret of the Push Service
appGUIDThe pushAppGUID of the Push Service
optionsThe push notification options
 
- 
                  
                  
This Methode used to register the client device to the IBM Cloud Push service. This is the normal registration, without userId.
Call this methode after successfully registering for remote push notification in the Apple Push Notification Service .
Declaration
Swift
public func registerWithDeviceToken(deviceToken: Data, WithUserId: String?, completionHandler: @escaping (_ response: String?, _ statusCode: Int?, _ error: String) -> Void)Parameters
deviceTokenThis is the response we get from the push registartion in APNS.
WithUserIdThis is the userId value.
completionHandlerThe closure that will be called when this request finishes. The response will contain response (String), StatusCode (Int) and error (string).
 - 
                  
                  
This Methode used to register the client device to the IBM Cloud Push service. This is the normal registration, without userId.
Call this methode after successfully registering for remote push notification in the Apple Push Notification Service .
Declaration
Swift
public func registerWithDeviceToken(deviceToken: Data, completionHandler: @escaping (_ response: String?, _ statusCode: Int?, _ error: String) -> Void)Parameters
deviceTokenThis is the response we get from the push registartion in APNS.
completionHandlerThe closure that will be called when this request finishes. The response will contain response (String), StatusCode (Int) and error (string).
 - 
                  
                  
This Method used to Retrieve all the available Tags in the IBM Cloud Push Service.
This methode will return the list of available Tags in an Array.
Declaration
Swift
public func retrieveAvailableTagsWithCompletionHandler(completionHandler: @escaping (_ response: NSMutableArray?, _ statusCode: Int?, _ error: String) -> Void)Parameters
completionHandlerThe closure that will be called when this request finishes. The response will contain response (NSMutableArray), StatusCode (Int) and error (string).
 - 
                  
                  
This Methode used to Subscribe to the Tags in the IBM Cloud Push srvice.
This methode will return the list of subscribed tags. If you pass the tags that are not present in the IBM Cloud App it will be classified under the TAGS NOT FOUND section in the response.
Declaration
Swift
public func subscribeToTags(tagsArray: NSArray, completionHandler: @escaping (_ response: NSMutableDictionary?, _ statusCode: Int?, _ error: String) -> Void)Parameters
tagsArraythe array that contains name tags.
completionHandlerThe closure that will be called when this request finishes. The response will contain response (NSMutableDictionary), StatusCode (Int) and error (string).
 - 
                  
                  
This Methode used to Retrieve the Subscribed Tags in the IBM Cloud Push srvice.
This methode will return the list of subscribed tags.
Declaration
Swift
public func retrieveSubscriptionsWithCompletionHandler(completionHandler: @escaping (_ response: NSMutableArray?, _ statusCode: Int?, _ error: String) -> Void)Parameters
completionHandlerThe closure that will be called when this request finishes. The response will contain response (NSMutableArray), StatusCode (Int) and error (string).
 - 
                  
                  
This Methode used to Unsubscribe from the Subscribed Tags in the IBM Cloud Push srvice.
This methode will return the details of Unsubscription status.
Declaration
Swift
public func unsubscribeFromTags(tagsArray: NSArray, completionHandler: @escaping (_ response: NSMutableDictionary?, _ statusCode: Int?, _ error: String) -> Void)Parameters
tagsArrayThe list of tags that need to be unsubscribed.
completionHandlerThe closure that will be called when this request finishes. The response will contain response (NSMutableDictionary), StatusCode (Int) and error (string).
 - 
                  
                  
This Methode used to UnRegister the client App from the IBM Cloud Push srvice.
Declaration
Swift
public func unregisterDevice(completionHandler: @escaping (_ response: String?, _ statusCode: Int?, _ error: String) -> Void)Parameters
completionHandlerThe closure that will be called when this request finishes. The response will contain response (String), StatusCode (Int) and error (string).
 
View on GitHub
        BMSPushClient Class Reference