     @objc(registerBiometricSecret:)
     func registerBiometricSecret(_ command: CDVInvokedUrlCommand){
         let data  = command.arguments[0] as AnyObject?;
-        if let secret = data?["secret"] as? String {
+        if let secret = data?.object(forKey: "secret") as? String {
             self.saveSecret(secret, command: command)
             return
         }

                    biometryType = "finger";
                case .faceID:
                    biometryType = "face"
                }
            }


        do {
            let secret = Secret()
            try? secret.delete()
            let invalidateOnEnrollment = (data?.object(forKey: "invalidateOnEnrollment") as? Bool) ?? false
            try secret.save(secretStr, invalidateOnEnrollment: invalidateOnEnrollment)
            pluginResult = CDVPluginResult(status: CDVCommandStatus_OK, messageAs: "Success");
        } catch {
