HID APPROVE SDK  5.13
HID Approve SDK for iOS/macOS
 All Classes Files Functions Variables Enumerations Enumerator Properties Pages
<HIDDevice> Protocol Reference

Parent device object used to query device information and discover any active containers. More...

#import <HIDDevice.h>

Instance Methods

(id< HIDContainer >) - createContainer:withSessionPassword:withListener:error:
 Triggers the container activation process to create a new container. More...
 
(BOOL) - deleteContainer:withSessionPassword:withParams:error:
 Deletes a container identified by its ID. The method notifies the server the container is deleted, thus requires the device to be online. More...
 
(NSArray *) - findContainers:error:
 Retrieves a container based on input parameter filter. More...
 
(NSString *) - getDeviceInfo:error:
 Retrieves device information. More...
 
(NSString *) - getVersion:
 Returns the version of the transaction processor client API. More...
 
(id< HIDServerActionInfo >) - retrieveActionInfo:error:
 Retrieves and decrypts an encrypted "server action" message received from the server. More...
 
(id< HIDServerActionInfo >) - retrieveActionInfo:withUserID:error:
 Retrieves and decrypts an encrypted "server action" message received from the server. More...
 
(BOOL) - setConnectionConfiguration:error:
 Sets connection configuration. More...
 

Detailed Description

Parent device object used to query device information and discover any active containers.

Method Documentation

- (id<HIDContainer>) createContainer: (HIDContainerInitialization *)  config
withSessionPassword: (NSString *)  sessionPassword
withListener: (NSObject< HIDProgressListener > *)  listener
error: (NSError **)  error 

Triggers the container activation process to create a new container.

Parameters
configinitialization configuration see HIDContainerInitialization for details
sessionPasswordtransaction protection key password (can be nil if not required by the policy)
listenerA HIDProgressListener implementation to which to report status information or receive password request events.
errorerror details. It may be nil.

Possible error codes are:

Returns
the container or nil if an error occurs.
- (BOOL) deleteContainer: (NSInteger)  containerId
withSessionPassword: (NSString *)  sessionPassword
withParams: (NSArray *)  parameters
error: (NSError **)  error 

Deletes a container identified by its ID. The method notifies the server the container is deleted, thus requires the device to be online.

Parameters
containerIdid of the container.
sessionPasswordtransaction protection key password (can be nil if not required by the policy).
parameterscan be empty (reserved for future use).
errorerror details. It may be nil.

Possible error codes are:

  • HIDInternal if unexpected error occurred
  • HIDInvalidArgument if the given parameters are invalid or required parameters are missing.
  • #HIDPasswordExpiredException if expired password is given (changePassword required).
  • #HIDAuthenticationException if password is incorrect.
Returns
YES if the delete was successfully performed.
- (NSArray*) findContainers: (NSArray *)  filter
error: (NSError **)  error 

Retrieves a container based on input parameter filter.

Parameters
filterarray of HIDParameter objects required to specify container

Filter can indicate:

Parameters
errorerror details. It may be nil.

Possible error codes are:

Returns
list of containers or nil if not found.
- (NSString*) getDeviceInfo: (NSString *)  propertyId
error: (NSError **)  error 

Retrieves device information.

Parameters
propertyIddeviceInfo property to retrieve.

Supported property names:

Parameters
errorerror details. It may be nil.

Possible error codes are:

Returns
the device property value, nil if an error occurs.
- (NSString*) getVersion: (NSError **)  error

Returns the version of the transaction processor client API.

Returns
version of the SDK version number.
- (id<HIDServerActionInfo>) retrieveActionInfo: (NSString *)  actionId
error: (NSError **)  error 

Retrieves and decrypts an encrypted "server action" message received from the server.

Parameters
actionIdaction ID message received in push notification, scan to approve or via HIDContainer.retrieveTransactionsIds()
errorerror details. It may be nil.

Possible error codes are:

  • HIDInternal if unexpected error occurred.
  • HIDInvalidContainer if the action id refers to a container that does not exist.
  • HIDInvalidArgument if the given parameters are invalid or required parameters are missing.
  • HIDInexplicitContainer if the action id cannot determine which container to apply. Invoke retrieveActionInfo with 'UserId' parameter. HID_ERROR_PARAMETERS includes list with ('UserId':user1,'UserId':user2..).
Returns
a HIDServerActionInfo instance containing action details, nil if an error occurs.
- (id<HIDServerActionInfo>) retrieveActionInfo: (NSString *)  actionId
withUserID: (NSString *)  userId
error: (NSError **)  error 

Retrieves and decrypts an encrypted "server action" message received from the server.

Parameters
actionIdaction ID message received in push notification, scan to approve or via HIDContainer.retrieveTransactionsIds()
userIduser identifier of the container to be used to retrieve action info from (Optional).
errorerror details. It may be nil.

Possible error codes are:

  • HIDInternal if unexpected error occurred.
  • HIDInvalidContainer if the action id refers to a container that does not exist.
  • HIDInvalidArgument if the given parameters are invalid or required parameters are missing.
  • HIDInexplicitContainer if the action id cannot determine which container to apply. Invoke retrieveActionInfo with 'UserId' parameter. HID_ERROR_PARAMETERS includes list with ('UserId':user1,'UserId':user2..).
Returns
a HIDServerActionInfo instance containing action details, nil if an error occurs.
- (BOOL) setConnectionConfiguration: (HIDConnectionConfiguration *)  config
error: (NSError **)  error 

Sets connection configuration.

Parameters
configconfiguration, see HIDConnectionConfiguration for details.
errorerror details. It may be nil.

Possible error codes are:

Returns
false if error occurs