SCM iOS API
Reader Class Reference

Class represents a smart card reader (either a physical, hardware reader, or a virtual smart card reader). More...

Inherits NSObject.

Instance Methods

(NSString *) - getName
 
(BOOL) - isCardPresent
 
(BOOL) - isDongle
 
(BOOL) - isVirtual
 
(enum ReaderStatus- getStatus
 
(void) - connect:
 

Detailed Description

Class represents a smart card reader (either a physical, hardware reader, or a virtual smart card reader).

Note that the constructor is not intended to be called by user code. Such objects are constructed internally by the API.

Method Documentation

◆ connect:()

- (void) connect: (void(^)(Token *token, NSError *error))  completionHandler

Connects to the card inserted in the reader. This method succeds only if the card is supported by the middleware.

Note that calling connect stops the scan for bluetooth peripherals.

Parameters
completionHandlerthe completion handler to call when the connection is complete. The completion handler is executed on the main queue and takes the following parameters:
  • token The Token object connected to the reader.
  • error nil if the connection is completed successfully; otherwise an NSError encapsulates the reason of failure.

◆ getName()

- (NSString *) getName

Gets the name of the reader.

Returns
the name of the reader.

◆ getStatus()

- (enum ReaderStatus) getStatus

Gets the status of the reader, as a ReaderStatus enum. The following status can be returned:

Returns
the status of the reader.

◆ isCardPresent()

- (BOOL) isCardPresent

Returns YES if the card is inserted in the reader.

Returns
YES if the card is inserted in the reader; NO otherwise.

◆ isDongle()

- (BOOL) isDongle

Returns YES if the reader is known as an USB dongle type (as opposed to a standard ID-1 format card reader).

Note: that this is indicative, and based on an internal registry of reader names.

Returns
YES if the reader is known as an USB dongle type; NO otherwise.

◆ isVirtual()

- (BOOL) isVirtual

Returns YES if the reader is a virtual smart card.

Returns
YES if the reader is a virtual smart card; NO otherwise.

The documentation for this class was generated from the following files: