HID APPROVE SDK  5.11
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...
 
(id< HIDTransactionInfo >) - retrieveTransactionInfo:error:
 Deprecated. Retrieves a transaction info associated to that transaction ID. More...
 
(BOOL) - setConnectionConfiguration:error:
 Sets connection configuration. More...
 
(BOOL) - updateDeviceInfo:withValue:withPassword:withParams:error:
 Deprecated. Updates device information. 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.
- (id<HIDTransactionInfo>) retrieveTransactionInfo: (NSString *)  transactionId
error: (NSError **)  error 

Deprecated. Retrieves a transaction info associated to that transaction ID.

Parameters
transactionIdtransaction ID message received in push notification.
errorerror details. It may be nil.

Possible error codes are:

Returns
a HIDTransactionInfo instance containing transaction details, nil if an error occurs.
Deprecated:
Deprecated in SDK 5.7.1. This method is no longer acceptable to retrieve transaction information. Use HIDDevice#retrieveActionInfo:error:.
- (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
- (BOOL) updateDeviceInfo: (NSString *)  propertyId
withValue: (NSString *)  propertyValue
withPassword: (NSString *)  sessionPassword
withParams: (NSArray *)  parameters
error: (NSError **)  error 

Deprecated. Updates device information.

This method is used by the application to notify of a change in one of the externally generated device attributes.

Parameters
propertyIddeviceInfo property to update.

Supported name attributes:

  • HID_DEVICE_INFO_PUSHID: update of the 'pushId', set up at provisioning and used by the server to notify the correct phone. Value may be null or empty to disable push notification for device.
  • HID_DEVICE_INFO_NAME: update of the device friendly name, set up at provisioning and used by the server to identify the correct phone.
Parameters
sessionPasswordtransaction protection key password (can be nil if not required by the policy)
propertyValuethe new value to replace.
parametersempty (reserved for future use)

Supported parameters:

Parameters
errorerror details. It may be nil.

Possible error codes are:

Returns
YES if property value was successfully updated.
Deprecated:
Deprecated in SDK 5.1. Integrations should replace calls with the HIDContainer.updateDeviceInfo:withParams:error: method.