Integration Steps
This section explains the core integration flow of the VIDA Shield SDK within an iOS application. Each step ensures the correct initialization, submit, and cleanup of the SDK lifecycle.
Import VIDA Shield
The first step is to import the VidaShield class into your Application start. This class serves as the entry point for all operations — initialization, starting and submitting the data for verification, and releasing resources.
import vidaShieldInitialize Shield SDK
To start using the Shield SDK, the first step is to initialize the SDK with the required configuration values such as API Key, License Key, Client ID, and Client Transaction ID. Initialization should be done once at app launch (e.g., AppDelegate / SceneDelegate) before calling any other Shield SDK APIs.
clientTransactionID
String
Mandatory : This is client’s transactionID for the specific flow, this will also used by customer to fetch the fraud details from backend
userId
String
Mandatory: UserID or hash of the UserID. This will help to configure rules around users.
Flow
String
Optional: This is the flow type where SDK is used for example : login, profile page, transaction page etc.
apiKey
String
Mandatory: This is provided by VIDA
licenseKey
String
Mandatory: This is provided by VIDA
clientId
String
Mandatory: This is provided by VIDA
isSDKInitialized() method
This method returns the status of SDK and it returns boolean status true/false.
Call SubmitData API
The submitData() is an asynchronous SDK call method that begins the submission process of collected data to the Vida server for analysis. Customers can call VIDA’s backend API to fetch the transaction details using clientTransactionID.
Use VidaShield.submitData() to trigger data submission. The SDK returns a VidaShieldResponse in the completion block. Check status to confirm whether submission succeeded.
VidaShieldResponse contains:
status → indicates success or failure
successDetails → additional data or error information returned by the SDK
errorDetails → error information like error code and error message. Application should log this information.
updateConfiguration API
updateConfiguration() is an asynchronous SDK API that allows the application to update configuration parameters after the SDK has been initialized.
This is useful when some values—such as flowType, transactionId / clientTransactionId, or userHashId—are not available during the initial setup and need to be provided or updated later in the user journey.Only the provided non-empty values are updated; nil or empty values will not override existing configuration. All value is optional.
This API also includes an optional escaping completion callback that returns a VidaShieldResponse. You can verify whether the update succeeded by checking response.status (true = success). If the update fails, refer to response.errorDetails for the failure reason.
Release Resources
releaseSDK() is used to fully reset the SDK. It clears all stored configuration and cached data, releases internal resources, and frees up memory used by the SDK.
Warning: Call this only when you do not plan to continue using the SDK with the current configuration, because it will remove existing config and state.
Use releaseSDK() if you want to switch to a new configuration and then initialize the SDK again with fresh/updated config values.
Do not call releaseSDK() if you want to keep using the SDK with the same configuration (use updateConfiguration() instead for updating only specific values).
VidaShieldConfig Implementation
The VIDAShieldConfig class defines the configuration parameters for the Shield sdk.
Parameters
apiKey
String
Mandatory: This is provided by VIDA
licenseKey
String
Mandatory: This is provided by VIDA
clientId
String
Mandatory: This is provided by VIDA
clientTransactionID
String
UUID for current app session
userHashId
String
Hash string of logged user id
Flow
String
Flow type: login, or dashboard, payment_flow
Last updated
