iOS integration guide

Updated on 03.09.25
1 minute to read
Copy link

Getting started

The iOS SDK is available to be integrated using Cocoapods. It’s backward compatible down to iOS 12.0. To install it, simply add the following line to your Podfile:

pod 'SEONIdVerification', '~> 2.0.13'

Then run the command below:

pod install

Alternatively, since version 1.6.0, you can install the SDK through SPM simply using this URL:

https://github.com/seontechnologies/seon-idv-sdk-ios-public

While we try to keep the backward compatibility down to lower iOS versions (currently down to 13.0), since some Document Verification Providers are releasing their updates on iOS 16 and higher, we are providing both variants for you. If you require to support iOS users down to iOS 13.0, simply use the configurations above. And if you prefer to go on the higher edge and have those updates published on higher iOS versions, use  configurations below.

Please note that this doesn't mean that the SDK in the above configurations will not get further updates later with latest features, as we will keep updating both of the SDKs with latest changes available from our providers. So, please stay tuned and make the choice based on the condition of your own app between the two variants.

In case you want to use the iOS 16+ variant:

pod 'SEONIdVerification-ModernAPI', '~> 2.0.13'

For SPM, you can use tags which has the “-ModernAPI” suffix to get the iOS 16+ variant. As of now, the latest release has the tag, which can be introduced in Xcode as a branch as well, when you import the library in the SPM.

v2.0.13-ModernAPI

We will update each variant as soon as we have more updates and improvements from each group of providers. Of course, internal updates from SEON and the services which are solely provided by SEON will be updated on both variants.

 

Using SDK in your app

1. Import framework

import SEONIdVerification

 

2. Initialize the SDK

Create customer data where license key field is mandatory, and there are more optional fields you can set in customerData: referenceId, type, email, phoneNumber, name, userId, address and any additional properties

let customerData = SEONCustomerData(
 licenseKey: "YOUR_LICENSE_KEY",
 referenceId: "UNIQUE_REFERENCE_ID", // Random unique value for the session
                                     // e.g. UUID, or {userID}-{timestamp} (required)
 email: "user@example.com",          // Email input (optional)
 name: "John Doe",                   // Name input (optional)
 phoneNumber: "+1234567890",         // Phone number input (optional)
 type: "id-verification",            // Process type (optional)
 userId: "user123",                  // Unique user identifier (optional)
 countryISOCode: "US",               // ISO code for the country (optional)
 address: "123 Main St, NY",         // Address input (optional)
 dateOfBirth: {                      // Reference date for the DoB check (optional)
   day: 1,
   month: 1,
   year: 2000,
 },
 postalCode: "12345",                // Reference value for postal check (optional)
 additionalProperties: {             // Custom key-value pairs (optional)
   customField1: "value1",
   customField2: "value2",
 },
)

 

For further information about the configuration, please visit the Session Input Configuration for iOS.

Initialize SDK with base url, customerData and preferred language iso code. Language code is optional, if it is not set, SDK will use the language of the OS. You may also want to define a in the Admin Panel, defining the required steps of the verification based on various requirements for different users. In this case, you can provide the id of that template to configure current session to have relevant steps, as defined in your template. You can also avoid passing this parameter and use the default verification steps as well.

SEONIdVerificationService.shared.initialize(
   baseUrl: "https://idv-eu.seon.io", // alternatively: "https://idv-us.seon.io"
   customerData: customerData,
   languageISOCode: "en",  // use the language iso code you prefer to use in the SDK. If not provided, we fall back on the default Locale language of the app, or finally on our default language, which is English (for the available languages please contact SEON)
   templateId: "YOUR_TEMPLATE_ID", // Optional. If you have created a template in the admin panel for the verification flow, you can provide its id here to be used.
)

 

3. Start verification flow

To start verification you need to pass your UINavigationController:

SEONIdVerificationService.shared.startIdVerificationFlow(navigationController: navigationController)

 

4. Handle verification result

Handle result with delegate:

SEONIdVerificationService.shared.delegate = self
extension YourDelegateClass: SEONIdVerificationServiceDelegate {
   func didFinishVerificationFlow(result: SEONIdVerification.SEONIdVerificationFlowResult) {
       switch result {
       case .completed:
           // Handle completed result (user finished the verification flow)
       case .complectedSuccess:
           // Handle completedSuccess result (user finished the verification flow with success verification)
       case .completedFailed:
           // Handle completedFailed result (user finished the verification flow with rejected verification)
       case .completedPending:
           // Handle completedPending result (user finished the verification flow with pending verification)
       case .interruptedByUser:
           // Handle interruptedByUser result (user navigated back to host app)
       case .error(let error):
           // Handle error result (an error code string is passed)
       }
   }
}

 

Handle result with completion block:

SEONIdVerificationService.shared.startIdVerificationFlow(navigationController: navController) { (result: SEONIdVerificationFlowResult) in
   switch result {
       case .completed:
           // Handle completed result (user finished the verification flow)
       case .completedSuccess:
           // Handle completedSuccess result (user finished the verification flow with success verification)
       case .completedFailed:
           // Handle completedFailed result (user finished the verification flow with rejected verification)
       case .completedPending:
           // Handle completedPending result (user finished the verification flow with pending verification)
       case .interruptedByUser:
           // Handle interruptedByUser result (user navigated back to host app)
       case .error(let error):
           // Handle error result (an error code string is passed)
       }
   }

 

Customize theme

You can customize basic colors of SDK setting SEONTheme colors:

SEONTheme.setAccentColor(.purple) // Main fill color for components
SEONTheme.setOnAccentColor(.white) // Text or figure colors on accent background
SEONTheme.setTextOnLightColor(.blue) // Text color on light background
SEONTheme.setTextOnDarkColor(.lightGray) // Text color on dark background
SEONTheme.setWatermarkImageVisibility(false) // Hide SEON Watermark Image if Needed
SEONTheme.setCustomFont(customFont) // If you want to use a standard font, no need to pass different variations
SEONTheme.setCustomFont(
    regular: regularFont,
    semibold: semiboldFont,
    bold: boldFont
) // If you want to use a custom font, you need to pass our three variations in use

 

Error codes

This section describes the possible error codes returned by the SEON iOS SDK, along with suggested checks and resolutions for each case.

 

error_code_1

Description: The current session is unrecoverable.

Resolution:

  • Start a new session by reinitializing the SDK with a fresh configuration.
  • Check if you have provided correct baseUrl, customerData and licenseKey (associated with correct bundle identifier).

 

error_code_2

Description: Failure in fetching session data or initializing the SDK due to missing or incorrect parameters.

Resolution:

  • Verify that the baseUrl is properly provided in the SDK initialization.
  • Confirm that the customerData is correctly set.
  • Check if the licenseKey is valid and correctly associated:
  • Ensure the licenseKey matches the bundle identifier registered with SEON.
  • The bundle identifier used in your project must be the same as the one associated with the license key on SEON’s server.
  • Ensure that the device has a stable internet connection.

 

error_code_3

Description: The session has expired.

Typical cause: Sessions can expire if the verification flow takes an excessively long time to complete.

Resolution: Restart the verification by creating a new session.

 

error_code_4

Description: The provided license key is invalid.

Resolution:

  • Verify that the licenseKey entered is correct.
  • Ensure the license key is active and has not been revoked or misconfigured.

 

error_code_5

Description: Retry limit reached during document capture.

Typical cause: The user has failed document capture attempts more than the allowed number of retries.

Resolution: Restart the verification process by initiating a new session.

 

error_code_6

Description: Retry limit reached during the liveness verification step.

Typical cause: The user has exceeded the maximum allowed number of retries for the liveness verification check.

Resolution: Restart the verification process by initiating a new session.