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
|
|---|
Function description: starts the device activation process. Parameters:
Returns: an error code:
|
IWActivationFinalize
|
|---|
Function description: finalizes the device activation process Parameters:
Returns: an error code
|
Unlock - Reset PIN
IWResetStart
|
|---|
Function description: starts the reset pin process Parameters:
Returns: an error code
|
IWResetFinalize
|
|---|
Function description: finalizes the reset pin process Parameters:
Returns: an error code
|
Synchronization
IWSynchronizeStart
|
|---|
Function description: starts the synchronization process to synchronize information between the application and TrustBuilder server. Returns: an error code |
IWSynchronizeFinalize
|
|---|
Function description: finalizes the synchronization process to synchronize information between the application and TrustBuilder server. Parameters:
Returns: an error code |
PIN update
IWPwdUpdateStart
|
|---|
Function description: starts the pin update process Returns: an error code
|
IWPwdUpdateFinalize
|
|---|
Function description: finalizes the pin update process Parameters:
Returns: an error code
|
Reset all Biometric keys
IWUnsetBiokeysStart
|
|---|
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
|
|---|
Function description: finalize the process of resetting all biometric keys. Parameters:
Returns: an error code
|
Register Biometric key
IWSetBiokeyStart
|
|---|
Function description: starts the biometrics registration process Returns: an error code
|
IWSetBiokeyFinalize
|
|---|
Function description: finalizes the biometrics registration process Parameters:
Returns: an error code
|
Online OTP
IWOnlineOtpStart
|
|---|
Function description: starts the “online OTP generation” process Parameters:
Returns: an error code
|
IWOnlineOtpFinalize
|
|---|
Function description: finalizes the “online OTP generation” process Parameters:
Returns: |
IWOtpAnswerOtp
|
|---|
Function description: retrieves a generated OTP after a process of online OTP generation (only if the Returns: an OTP |
IWOnlineOtpFinalizeExt
|
|---|
Function description: finalizes the “online OTP generation” process with biometric keys Parameters:
Returns: an error code
|
Offline OTP
IWOtpShouldSynchronize
|
|---|
Function description: checks if a synchronization process is required, before starting the process of Offline OTP generation Parameters:
Returns: an error code
|
IWOtpModeQuery
|
|---|
Function description: indicates whether the pin should be requested, after a Parameters:
Returns: an error code
|
IWOtpGenerateMa
|
|---|
Function description: retrieves a generated OTP after a process of offline OTP generation (only if the Parameters:
Returns: an OTP |
IWDisplayTime
|
|---|
Function description: displays the remaining time before the OTP expiration (in seconds) Returns: |
Push Notifications
IWSetDeviceOS
|
|---|
Function description: defines the device operating system. Parameters:
To use Firebase notification service you must change the device OS to "firebase" using |
IWPushRegistrationStart
|
|---|
Function description: starts the push registration process to allow TrustBuilder to send push notifications to your application. Returns: an error code
|
IWPushRegistrationFinalize
|
|---|
Function description: finalizes the push registration process to allow TrustBuilder to send push notifications to your application. Parameters:
Returns: an error code
|
IWCheckPush
|
|---|
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
|
|---|
Function description: Gets the push session id, or alias, related to the retrieved push (if a Returns: |
IWPushAction
|
|---|
Function description: gets the push action type of the push notification (authenticate or activate) Returns: |
IWPushContext
|
|---|
Function description: gets the push notification context information if there is one (authentication only) Returns: |
Sealing
IWOnlineSealStart
|
|---|
Function description: starts the “online seal generation” process Parameters:
Returns: an error code |
IWOnlineSealFinalize
|
|---|
Function description: finalizes the “online seal generation” process Parameters:
Returns: |
IWOnlineSealFinalizeExt
|
|---|
Function description: finalizes the “online seal generation” process with biometric keys Parameters:
Returns: an error code |
IWSealAnswerOtp
|
|---|
Function description: retrieves a generated OTP after a process of seal generation (only if the Returns: an OTP |
IWSealShouldSynchronize
|
|---|
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
|
|---|
Function description: initializes the Offline Seal process indicating whether the pin should be requested Parameters:
Returns: always returns 1 → pin is required |
IWSealGenerate
|
|---|
Function description: generates the seal Parameters:
Returns: the generated seal |
Configuration
IWVersionGet
|
|---|
Function description: gets the mAccess library version Returns: the library version number |
IWHostVersionSet
|
|---|
Function description: provides the host/application version number. Parameters:
|
IWWsTimeoutSet
|
|---|
Function description: defines the timeout value for the web service calls, in millisecond. Parameters:
|
IWWsServerSet
|
|---|
Function description: defines the server value for the web service calls Parameters:
|
IWLangSet
|
|---|
Function description: defines the application language. Parameters:
|
IWMaccessSet
|
|---|
Function description: provides the mAccess ID associated to its service Parameters:
|
Storage
IWStorageDataChanged
|
|---|
Function description: indicates whether the stored data has changed. When true, the host should call Returns:
|
IWStorageDataGet
|
|---|
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
|
|---|
Function description: provides the stored data to the library. This should be done only once, at initialization. Parameters:
Returns: an error code
|
Information
IWPinMode
|
|---|
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
|
|---|
Function description: indicates whether a major version update of the mAccess library is required. Returns:
|
IWNewVersionAvailable
|
|---|
Function description: indicates whether a new version of the host/application is available Returns:
|
IWNewVersionURL
|
|---|
Function description: gets the URL new version Returns:
|
IWShouldAskForMinorUpdate
|
|---|
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
|
|---|
Function description: indicates whether the application integrating mAccess library is activated, whether the account is activated with mAccess or not. Returns:
|
IWMustUpgrade
|
|---|
Function description: indicates whether the application must upgrade first (the local data is from an old version). Returns:
|
IWIsBlocked
|
|---|
Function description: indicates whether the device is blocked. If yes, it has to be unlocked. Returns:
|
IWServiceNb
|
|---|
Function description: indicates the number of services Returns: “1” which means that the application is linked to one service. |
IWServiceName
|
|---|
Function description: indicates the name of the TrustBuilder service linked to the application Parameters:
Returns: the service name |
IWServiceLogo
|
|---|
Function description: indicates the URL of the service PNG logo. Parameters:
Returns: URL of the service logo |
IWServiceDisabled
|
|---|
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.