HID APPROVE SDK 6.1
HID Approve SDK for iOS/macOS
Loading...
Searching...
No Matches
HIDDeviceFactory Class Reference

Factory for creating a new device instance. More...

#include <HIDDevice.h>

Inheritance diagram for HIDDeviceFactory:

Instance Methods

(id< HIDDevice >) - getDevice:error:
 Return device instance.
(id< HIDDevice >) - getExportedDevice:withAppGroupId:withKeychainId:error:
 Return exported device instance.
(id< HIDDevice >) - newInstance:error:
 Deprecated. Create device instance

Class Methods

(id) + factory
 Instantiate the device factory.
(BOOL) + reset:
 Deletes all containers and keys contained in the device.
(BOOL) + reset:withKeychainId:error:
 Deletes all containers and keys contained in the device and in the shared workspace.

Detailed Description

Factory for creating a new device instance.

Method Documentation

◆ getDevice:error:

- (id< HIDDevice >) getDevice: (HIDConnectionConfiguration *) config
error: (NSError **) error 

Return device instance.

Parameters
configoptional connection configuration.
errorerror details. It may be nil.

Possible error codes are:

Returns
An HIDDevice instance.

◆ getExportedDevice:withAppGroupId:withKeychainId:error:

- (id< HIDDevice >) getExportedDevice: (HIDConnectionConfiguration *) config
withAppGroupId: (NSString *) appGroupId
withKeychainId: (NSString *) keychainId
error: (NSError **) error 

Return exported device instance.

Parameters
configoptional connection configuration.
appGroupIdthe declared id from the application's app-group capability
keychainIdthe declared id from the application's keychain-sharing capability (prefix with teamid)
errorerror details. It may be nil.

Possible error codes are:

Returns
An HIDDevice instance.

◆ newInstance:error:

- (id< HIDDevice >) newInstance: (HIDConnectionConfiguration *) config
error: (NSError **) error 

Deprecated. Create device instance

Parameters
configoptional connection configuration.
errorerror details. It may be nil.

Possible error codes are:

Returns
The HIDDevice instance.
Deprecated
Deprecated in SDK 5.13. Integrations should replace calls with the getDevice:error: method.

◆ reset:

+ (BOOL) reset: (NSError **) error

Deletes all containers and keys contained in the device.

Parameters
errorerror details. It may be nil.

Possible error codes are:

Returns
YES if reset successful.

◆ reset:withKeychainId:error:

+ (BOOL) reset: (NSString *) appGroupId
withKeychainId: (NSString *) keychainId
error: (NSError **) error 

Deletes all containers and keys contained in the device and in the shared workspace.

Parameters
errorerror details. It may be nil.

Possible error codes are:

Returns
YES if reset successful.