     func initialize(command: CDVInvokedUrlCommand) {
         self.commandDelegate.runInBackground({
             if command.arguments.count > 2 && (command.arguments[2] as! NSDictionary).count > 0{
-                
+
                 guard let appGUID  = command.arguments[0] as? String else {
                     let pluginResult = CDVPluginResult(status: CDVCommandStatus_ERROR, messageAsString: CustomErrorMessages.invalidGuid)
                     // call success callback

                    self.commandDelegate!.sendPluginResult(pluginResult, callbackId:command.callbackId)
                    return
                }
                
                //use category to handle objective-c exception
                BMSPushClient.sharedInstance.initializeWithAppGUID(appGUID:appGUID, clientSecret:clientSecret)
                
                let pluginResult = CDVPluginResult(status: CDVCommandStatus_OK, messageAsString: "SuccesFully initialized")
                // call success callback
                self.commandDelegate!.sendPluginResult(pluginResult, callbackId:command.callbackId)

                        for name in bmsNotifOptions {
                            print(name.key)
                            // print(((name.value) as! Dictionary).values)

                            let identifiers:NSArray = (name.value) as! NSArray
                            var actionArray = [BMSPushNotificationAction]()
                            for identifier in identifiers {
                                actionArray.append(BMSPushNotificationAction(identifierName: (identifier as? NSDictionary)?.allKeys.first as! String, buttonTitle: (identifier as? NSDictionary)?.allValues.first as! String, isAuthenticationRequired: false, defineActivationMode: UIUserNotificationActivationMode.background))
                            }

                            let category = BMSPushNotificationActionCategory(identifierName: name.key as! String, buttonActions: actionArray)

                            let notifOptions = BMSPushClientOptions(categoryName: [category])

                            let push = BMSPushClient.sharedInstance;

                            push.initializeWithAppGUID(appGUID: appGUID, clientSecret: clientSecret, options: notifOptions);

                            let pluginResult = CDVPluginResult(status: CDVCommandStatus_OK, messageAs: "")
                            // call success callback
                            self.commandDelegate!.send(pluginResult, callbackId:command.callbackId)
                        }
                    }
                    if(bmsNotifOptions.count == 2){
                        guard let deviceId = bmsNotifOptions.value(forKey:"deviceId") as? String else {
                            let pluginResult = CDVPluginResult(status: CDVCommandStatus_ERROR, messageAs: "Invalid BMSPush Options")
                            // call success callback
                            self.commandDelegate!.send(pluginResult, callbackId:command.callbackId)
