Skip to main content
To run the SDK a Verisoul Project ID is required. Schedule a call here to get started.

System Requirements

  • iOS 14.0 or higher
  • Xcode 15.0 or higher
  • Swift 5.9 or higher
  • CocoaPods 1.10+ (if using CocoaPods)
  • SDK Size: ~480 KB

Installation

You can install VerisoulSDK in your iOS project using either CocoaPods or Swift Package Manager.

CocoaPods

To integrate VerisoulSDK with CocoaPods:
  1. Ensure CocoaPods is installed on your machine. If not, run:
  2. Add VerisoulSDK to your Podfile:
  3. Run the following command to install the SDK:
  4. Open the .xcworkspace file in Xcode and start using the SDK.

Swift Package Manager (SPM)

To integrate VerisoulSDK using Swift Package Manager:
  1. Open your project in Xcode.
  2. Go to File > Add Packages.
  3. Enter the repository URL for VerisoulSDK:
  4. Choose the version you wish to use and add the package.
The SDK will automatically integrate into your project.

iOS Device Check

To fully utilize the Verisoul SDK, you must add the App Attest capability to your project. This capability allows the SDK to perform necessary checks and validations to ensure the integrity and security of your application. Update your app’s entitlements file:

Usage

Initialize the SDK

Call configure() before you intend to retrieve a Verisoul session_id.
The configure() method initializes the Verisoul SDK with your project credentials. Only initialize the SDK if you plan to retrieve a session_id and call the Verisoul API for that session. Parameters:
  • env: The environment to use .prod for production or .sandbox for testing
  • projectId: Your unique Verisoul project identifier

Get Session ID

The session() method returns the current session identifier after the SDK has collected sufficient device data. This session ID is required to request a risk assessment from Verisoul’s API. Important Notes:
  • Session IDs are short-lived and expire after 24 hours
  • The session ID becomes available once minimum data collection is complete (typically within seconds)
  • You should send this session ID to your backend, which can then call Verisoul’s API to get a risk assessment
Example:

Provide Touch Events

The Verisoul SDK automatically captures touch events when integrated. No additional code is required for touch event collection.

Error Codes

The SDK throws VerisoulException with the following error codes:

Exception Structure

All errors are thrown as VerisoulException with the following properties:

Example

For a complete working example, see the iOS Sample App.

Additional Resource