Enumerations

The following enumerations are available globally.

  • Represents the type of a bluetooth device.

    See more

    Declaration

    Swift

    public enum BluetoothPeripheralType
  • Represents the key algorithm.

    See more

    Declaration

    Swift

    public enum KeyAlgorithm
  • Represents a reader status that can be returned.

    See more

    Declaration

    Swift

    @frozen
    public enum ReaderStatus
  • Represents the type of the reader.

    See also

    Reader.getType()
    See more

    Declaration

    Swift

    public enum ReaderType
  • Represents an error that can be thrown or returned from function of the API.

    Generally, whenever a completionHandlerreturns a NSError, a SCMError may be present through NSError.scmError to describe the error.

    Example:

    pin.login(value: "****") { error in
        if let error = error {
            if (error.scmError == SCMError.CKR_PIN_INCORRECT) {
                // pin value is incorrect
            }
            else if (error.scmError == SCMError.CKR_PIN_LOCKED) {
                // pin is locked
            }
            else {
                // check other errors...
            }
        }
        else {
            // login is sucessful
        }
    }
    

    See also

    NSError.scmError
    See more

    Declaration

    Swift

    public enum SCMError : Error