Reference doc - mAccess library (iOS)
This is a reference documentation of the TrustBuilder MFA mAccess library (iOS). It lists error codes and functions integrated in the library.
Download mAccess library
The last version of TrustBuilder MFA mAccess library is available on the Resources Downloads page.
The mAccess library for iOS is a static C library. To integrate it in Swift, go over the implementation guide and the sample application to know how to integrate the TrustBuilder MFA SDK to your iOS application.
Error codes
Code | Value | Description |
---|---|---|
IW_ERR_OK | 0 | no error |
IW_ERR_NETWORK | 1 | network or server unreachable |
IW_ERR_CODE | 2 | The Activation code is incorrect |
IW_ERR_SN | 3 | one argument does not have the right syntax |
IW_ERR_ACCESS | 4 | access refused |
IW_ERR_VERSION | 5 | version error |
IW_ERR_BLOCKED | 7 | account is blocked |
IW_ERR_STATE | 8 | internal state not correct |
IW_ERR_NODEVICE | 9 | device is disabled or unknown |
IW_ERR_NOCA | 10 | User must activate helium or Desktop Token before achieving this operation |
IW_ERR_NOSRV | 11 | No service is available |
IW_ERR_PINREUSED | 12 | the new password equals the previous one |
IW_ERR_SYNCHROFAILED | 13 | the operation succeeded but it required a post-synchronization which failed |
IW_ERR_FORBIDDEN | 14 | forbidden operation (due to activated state/blocked state/upgradable state) |
IW_ERR_PINREFUSED | 15 | the password is refused (bad format) |
IW_ERR_TIMEOUT | 16 | timeout expired between xxxStart and xxxFinalize |
IW_ERR_BIOKEY | 26 | device is locked due to biokey errors |
IW_DESYNCHRONIZED | 27 | device desynchronized |
IW_ERR_OTHER | 999 | any other error |
Pin Mode codes
Code | Value | Description |
---|---|---|
IW_PINMODE_NONE | 0 | no pin is required (leave “”) |
IW_PINMODE_CURRENT | 1 | current pin is required |
IW_PINMODE_NEW | 2 | a new pin is required |
IW_PINMODE_BIO | 8 | a biokey is required |
IW_PINMODE_CURRENT | IW_PINMODE_BIO | 9 | a pin OR biokey is required |
Functions
The following functions are declared is the header file iw.h.
Activation
IWActivationStart |
---|
CODE
Function description: starts the device activation process. Parameters:
Returns: an error code:
|
IWActivationFinalize |
---|
CODE
Function description: finalizes the device activation process Parameters:
Returns: an error code
|
Unlock - Reset PIN
IWResetStart |
---|
CODE
Function description: starts the reset pin process Parameters:
Returns: an error code
|
IWResetFinalize |
---|
CODE
Function description: finalizes the reset pin process Parameters:
Returns: an error code
|
Synchronization
IWSynchronizeStart |
---|
CODE
Function description: starts the synchronization process to synchronize information between the application and TrustBuilder server. Returns: an error code |
IWSynchronizeFinalize |
---|
CODE
Function description: finalizes the synchronization process to synchronize information between the application and TrustBuilder server. Parameters:
Returns: an error code |
PIN update
IWPwdUpdateStart |
---|
CODE
Function description: starts the pin update process Returns: an error code
|
IWPwdUpdateFinalize |
---|
CODE
Function description: finalizes the pin update process Parameters:
Returns: an error code
|
Reset all Biometric keys
IWUnsetBiokeysStart |
---|
CODE
Function description: starts the process of resetting all biometric keys. Returns: an error code
A call to IWPinMode () will indicate which kind of password is required (current or none) |
IWUnsetBiokeysFinalize |
---|
CODE
Function description: finalize the process of resetting all biometric keys. Parameters:
Returns: an error code
|
Register Biometric key
IWSetBiokeyStart |
---|
CODE
Function description: starts the biometrics registration process Returns: an error code
|
IWSetBiokeyFinalize |
---|
CODE
Function description: finalizes the biometrics registration process Parameters:
Returns: an error code
|
Online OTP
IWOnlineOtpStart |
---|
CODE
Function description: starts the “online OTP generation” process Parameters:
Returns: an error code
|
IWOnlineOtpFinalize |
---|
CODE
Function description: finalizes the “online OTP generation” process Parameters:
Returns: |
IWOtpAnswerOtp |
---|
CODE
Function description: retrieves a generated OTP after a process of online OTP generation (only if the Returns: an OTP |
IWOnlineOtpFinalizeExt |
---|
CODE
Function description: finalizes the “online OTP generation” process with biometric keys Parameters:
Returns: an error code
|
Offline OTP
IWOtpShouldSynchronize |
---|
CODE
Function description: checks if a synchronization process is required, before starting the process of Offline OTP generation Parameters:
Returns: an error code
|
IWOtpModeQuery |
---|
CODE
Function description: indicates whether the pin should be requested, after a Parameters:
Returns: an error code
|
IWOtpGenerateMa |
---|
CODE
Function description: retrieves a generated OTP after a process of offline OTP generation (only if the Parameters:
Returns: an OTP |
IWDisplayTime |
---|
CODE
Function description: displays the remaining time before the OTP expiration (in seconds) Returns: |
Push Notifications
IWSetDeviceOS |
---|
CODE
Function description: defines the device operating system. Parameters:
To use Firebase notification service you must change the device OS to "firebase" using |
IWPushRegistrationStart |
---|
CODE
Function description: starts the push registration process to allow TrustBuilder to send push notifications to your application. Returns: an error code
|
IWPushRegistrationFinalize |
---|
CODE
Function description: finalizes the push registration process to allow TrustBuilder to send push notifications to your application. Parameters:
Returns: an error code
|
IWCheckPush |
---|
CODE
Function description: Checks if a push notification is available on TrustBuilder server for the active instance of mAccess, and retrieves it. Typically this function can be called when starting the application. Returns: an error code
|
IWPushAlias |
---|
CODE
Function description: Gets the push session id, or alias, related to the retrieved push (if a Returns: |
IWPushAction |
---|
CODE
Function description: gets the push action type of the push notification (authenticate or activate) Returns: |
IWPushContext |
---|
CODE
Function description: gets the push notification context information if there is one (authentication only) Returns: |
Sealing
IWOnlineSealStart |
---|
CODE
Function description: starts the “online seal generation” process Parameters:
Returns: an error code |
IWOnlineSealFinalize |
---|
CODE
Function description: finalizes the “online seal generation” process Parameters:
Returns: |
IWOnlineSealFinalizeExt |
---|
CODE
Function description: finalizes the “online seal generation” process with biometric keys Parameters:
Returns: an error code |
IWSealAnswerOtp |
---|
CODE
Function description: retrieves a generated OTP after a process of seal generation (only if the Returns: an OTP |
IWSealShouldSynchronize |
---|
CODE
Function description: indicates if synchronization should be proposed to the user, BEFORE offline sealing. (i.e. before calling IWSealModeQuery ()). This would signify that more than 3 generations are performed in less than 2 minutes for the same service. Parameters:
Returns:
|
IWSealModeQuery |
---|
CODE
Function description: initializes the Offline Seal process indicating whether the pin should be requested Parameters:
Returns: always returns 1 → pin is required |
IWSealGenerate |
---|
CODE
Function description: generates the seal Parameters:
Returns: the generated seal |
Configuration
IWVersionGet |
---|
CODE
Function description: gets the mAccess library version Returns: the library version number |
IWHostVersionSet |
---|
CODE
Function description: provides the host/application version number. Parameters:
|
IWWsTimeoutSet |
---|
CODE
Function description: defines the timeout value for the web service calls, in millisecond. Parameters:
|
IWWsServerSet |
---|
CODE
Function description: defines the server value for the web service calls Parameters:
|
IWLangSet |
---|
CODE
Function description: defines the application language. Parameters:
|
IWMaccessSet |
---|
CODE
Function description: provides the mAccess ID associated to its service Parameters:
|
Storage
IWStorageDataChanged |
---|
CODE
Function description: indicates whether the stored data has changed. When true, the host should call Returns:
|
IWStorageDataGet |
---|
CODE
Function description: gets the data to be stored locally. This string contains the internal state of mAccess (keys, service description …). The host should not try to process this string: it should only store it locally. Returns: The data to be stored (ASCII string) |
IWStorageDataSet |
---|
CODE
Function description: provides the stored data to the library. This should be done only once, at initialization. Parameters:
Returns: an error code
|
Information
IWPinMode |
---|
CODE
Function description: indicates the pin mode that should be used for the current process Returns: pinmode
To know more, refer to “Pin Mode codes” table. |
IWMajorVersionRequired |
---|
CODE
Function description: indicates whether a major version update of the mAccess library is required. Returns:
|
IWNewVersionAvailable |
---|
CODE
Function description: indicates whether a new version of the host/application is available Returns:
|
IWNewVersionURL |
---|
CODE
Function description: gets the URL new version Returns:
|
IWShouldAskForMinorUpdate |
---|
CODE
Function description: indicates whether a minor version update should be proposed to the user. Returns: Returns 1 if a minor version update should be proposed to the user. After this function returns 1 once, it will always return 0. |
IWIsActivated |
---|
CODE
Function description: indicates whether the application integrating mAccess library is activated, whether the account is activated with mAccess or not. Returns:
|
IWMustUpgrade |
---|
CODE
Function description: indicates whether the application must upgrade first (the local data is from an old version). Returns:
|
IWIsBlocked |
---|
CODE
Function description: indicates whether the device is blocked. If yes, it has to be unlocked. Returns:
|
IWServiceNb |
---|
CODE
Function description: indicates the number of services Returns: “1” which means that the application is linked to one service. |
IWServiceName |
---|
CODE
Function description: indicates the name of the TrustBuilder service linked to the application Parameters:
Returns: the service name |
IWServiceLogo |
---|
CODE
Function description: indicates the URL of the service PNG logo. Parameters:
Returns: URL of the service logo |
IWServiceDisabled |
---|
CODE
Function description: indicates whether the service is disabled or not. Parameters:
Returns:
|
Asynchronous functions
The result of the webservice calls will be handled by callback functions which are passed to the start and finalize functions.