Overview
The Onfido Smart Capture SDKs provide a set of screens and functionalities that enable applications to implement user identity verification flows. Each SDK contains:
- Carefully designed UX to guide your customers through the different photo or video capture processes
- Modular design to help you seamlessly integrate the different photo or video capture processes into your application's flow
- Advanced image quality detection technology to ensure the quality of the captured images meets the requirement of the Onfido identity verification process, guaranteeing the best success rate
- Direct image upload to the Onfido service, to simplify integration
- A suite of advanced fraud detection signals to protect against malicious users
All Onfido Smart Capture SDKs are orchestrated using Onfido Studio workflows, with only minor customization differences between the available platforms.
Environments and testing with the SDK
Two environments exist to support the Onfido SDK integrations:
- 'sandbox' - to be used for testing with sample documents
- 'live' - to be used only with real documents and in production apps
The environment being used is determined by the API token that is used to generate the necessary SDK token .
Going Live
Once you are satisfied with your integration and are ready to go live, please contact [email protected] to obtain a live API token. You will have to replace the sandbox token in your code with the live token.
Check that you have entered correct billing details inside your Onfido Dashboard , before going live.
Adding the SDK dependency
The iOS SDK supports:
- iOS 12+
- Xcode 15+ *
- Full bitcode support
-
The SDK supports the following presentation styles:
- Only full screen style for iPhones
- Full screen and form sheet styles for iPads
Note : The latest SDK version to support Xcode 11.5-12 is iOS SDK version 22, Xcode 14+ is iOS SDK version 29. There is a workaround for older versions of Xcode if required. Please contact support for more information.
Note
: The iOS SDK requires CoreNFC to run (regardless of whether you use NFC or not). Since Xcode 12, there is a bug where
libnfshared.dylib
is missing from simulators. Refer to
Stack Overflow
for a solution to this problem.
Note : In the event that you disable the NFC feature, Apple might ask you to provide a video to demonstrate NFC usage because NFC-related code is part of the SDK binary, regardless of runtime configuration. While we're working on a permanent solution for this problem, you can contact Onfido's Customer Support team in the meantime to obtain a video.
App permissions
The SDK makes use of a user's device camera (for document and face capture) and microphone (for video and motion capture). You're required to have the following keys in your application's
Info.plist
file:
-
NSCameraUsageDescription
-
NSMicrophoneUsageDescription
<key>NSCameraUsageDescription</key> <string>Required for document and face capture</string> <key>NSMicrophoneUsageDescription</key> <string>Required for video capture</string>
Note : All keys will be required for app submission.
Swift
dependencies: [ .package(url: "https://github.com/onfido/onfido-ios-sdk.git", .branch("master"))
Using CocoaPods
The SDK is also available on CocoaPods, and you can include it in your project by adding the following to your Podfile:
pod 'Onfido'
Run
pod install
to get the SDK.
Manual installation
The SDK is available in the GitHub Releases tab , where you can download the compressed framework. You can find the latest release here .
-
Download
the compressed debug zip file containing
the
Onfido.framework
-
Uncompress the zip file and then move the
Onfido.framework
artefact into your project -
Add
Onfido.framework
located within your project to theEmbedded binaries
section in theGeneral
tab of your iOS app target - Open your app's project file in Xcode. Then select your app's target under target list
-
Next select the
Build Phases
tab and under theEmbed Frameworks
step add a newRun Script Phase
. Name itOnfido Framework Archive
- In the text area, add the following code:
if [[ "$ACTION" != "install" ]]; then exit 0; FRAMEWORK_DIR="${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" ONFIDO_FRAMEWORK="${FRAMEWORK_DIR}/Onfido.framework" cd "${ONFIDO_FRAMEWORK}" lipo -remove i386 Onfido -o Onfido lipo -remove x86_64 Onfido -o Onfido
Non-Swift apps
If your app is not Swift based, then you must create a new Swift file inside of your project. This file is required to force Xcode to package Swift runtime libraries required for the Onfido iOS SDK to run.
-
Create a Swift file with the following contents:
swiftCopyimport Foundation import AVFoundation import CoreImage import UIKit import Vision func fixLibSwiftOnoneSupport() { // from https://stackoverflow.com/a/54511127/2982993 print("Fixes dyld: Library not loaded: @rpath/libswiftSwiftOnoneSupport.dylib")
-
Set
Always Embed Swift Standard Libraries
toYes
in your project configuration.
Defining a workflow
Onfido Studio is the platform used to create highly reusable identity verification workflows for use with the Onfido SDKs. For an introduction to working with workflows, please refer to our Getting Started guide , or the Onfido Studio product guide .
SDK sessions are orchestrated by a session-specific
workflow_run_id
, itself derived from a
workflow_id
, the unique identifier of a given workflow.
For details on how to generate a
workflow_run_id
, please refer to the
POST /workflow_runs/
endpoint definition in the Onfido
API reference
.
Note that in the context of the SDK, the
workflow_run_id
property is referred to asworkflowRunId
.
Applicant ID reuse
When defining workflows and creating identity verifications, we highly recommend saving the
applicant_id
against a specific user for potential reuse. This helps to keep track of users should you wish to run multiple identity verifications on the same individual, or in scenarios where a user returns to and resumes a verification flow.
SDK authentication
The SDK is authenticated using SDK tokens. As each SDK token must be specific to a given applicant and session, a new token must be generated each time you initialize the Onfido iOS SDK.
Parameter | Notes |
---|---|
applicant_id
|
required
Specifies the applicant for the SDK instance. |
application_id
|
required
The application ID (for iOS "application bundle ID") that was set up during development. For iOS, this is usually in the form
com.your-company.app-name
. Make sure to use a valid
application_id
or you'll receive a 401 error.
|
For details on how to generate SDK tokens, please refer to
POST /sdk_token/
definition in the Onfido
API reference
.
Note : You must never use API tokens in the frontend of your application as malicious users could discover them in your source code. You should only use them on your server.
withTokenExpirationHandler
It's important to note that SDK tokens expire after 90 minutes .
With this in mind, we recommend you use the optional
withTokenExpirationHandler
parameter in the SDK token configuration function to generate and pass a new SDK token when it expires. This ensures the SDK continues its flow even after an SDK token has expired.
Swift
func getSDKToken(_ completion: @escaping (String) -> Void) { // Your network request logic to retrieve SDK token goes here completion(myNewSDKtoken) let workflowConfiguration = WorkflowConfiguration(workflowRunId: "<WORKFLOW_RUN_ID>", sdkToken: "<YOUR_SDK_TOKEN>") workflowConfiguration.withTokenExpirationHandler(handler: getSDKToken)
Objective-C
-(void) getSDKTokenWithCompletion: (void(^)(NSString *))handler { // <Your network request logic to retrieve SDK token goes here> handler(sdkToken); ONWorkflowConfiguration *workflowConfiguration = [[ONWorkflowConfiguration alloc] initWithWorkflowRunId: @"<WORKFLOW_RUN_ID>" sdkToken: @"<YOUR_SDK_TOKEN>"]; [workflowConfiguration withTokenExpirationHandler: ^(void (^handler)(NSString *)) { [self getSDKTokenWithCompletion:handler];
Swift
let workflowConfiguration = WorkflowConfiguration(workflowRunId: "<WORKFLOW_RUN_ID>", sdkToken: "<YOUR_SDK_TOKEN>")
Swift
let onfidoRun = OnfidoFlow(workflowConfiguration: orchestrationConfig) customerViewController.present(try onfidoRun.run(), animated: true, completion: nil) // listen for the result
NFC capture using Onfido Studio
Recent passports, national identity cards and residence permits contain a chip that can be accessed using Near Field Communication (NFC). The Onfido SDKs provide a set of screens and functionalities to extract this information, verify its authenticity and provide the resulting verification as part of a Document report.
From version 29.1.0 onwards of the Onfido iOS SDK, NFC is enabled by default and offered to end users when both the document and the device support NFC.
For more information on how to configure NFC and the list of supported documents, please refer to the NFC for Document Report guide.
Pre-requisites
-
This feature requires
Near Field Communication Tag Reading
capability in your app target. If you haven't added it before, please follow the steps in Apple's documentation . -
You're required to have the following key in your application's
Info.plist
file:
<key>NFCReaderUsageDescription</key> <string>Required to read ePassports</string>
-
You have to include the entries below in your app target's
Info.plist
file to be able to read NFC tags properly.
<key>com.apple.developer.nfc.readersession.felica.systemcodes</key> <array> <string>12FC</string> </array> <key>com.apple.developer.nfc.readersession.iso7816.select-identifiers</key> <array> <string>A0000002471001</string> <string>A0000002472001</string> <string>00000000000000</string> <string>D2760000850101</string> </array>
Disabling NFC
NFC is enabled by default. To disable NFC, call the
disableNFC()
function while configuring
OnfidoConfig
(see the
Advanced flow customization
section below).
Swift
let appearance = Appearance() appearance.primaryColor = <DESIRED_UI_COLOR_HERE> appearance.primaryTitleColor = <DESIRED_UI_COLOR_HERE>
Objective-C
ONAppearance *appearance = [[ONAppearance alloc] init]; appearance.primaryColor = <DESIRED_UI_COLOR_HERE>; appearance.primaryTitleColor = <DESIRED_UI_COLOR_HERE>;
To apply the appearance, you can use the method below:
Objective-C
@objc @discardableResult public func withAppearance(_ appearance: Appearance) -> WorkflowConfiguration { self.appearance = appearance return self
Please refer to the SDK customization documentation for details of the supported UI options that can be set in this property.
Dark theme
The iOS SDK supports dark theme customization. By default, the user's active device theme will be automatically applied to the Onfido SDK. However, you can opt out from dynamic theme switching at run time and instead set a theme statically at the build time as shown below. In this case, the flow will always be displayed in the selected theme regardless of the user's device theme.
interfaceStyle
allows you to force light or dark mode via
.dark
and
.light
respectively.
By default, it is set to
.unspecified
, which will follow the system's interface style.
Note:
The previous attribute
supportDarkMode
is now deprecated. Please use
interfaceStyle
instead.
For example, to set the interface style to
.dark
, you can use the code below:
Objective-C
ONAppearance *appearance = [ONAppearance new]; [appearance setUserInterfaceStyle:UIUserInterfaceStyleDark];
Swift
let configBuilder = OnfidoConfig.builder() configBuilder.withAppearance(appearance)
Objective-C
ONFlowConfigBuilder *configBuilder = [ONFlowConfig builder]; [configBuilder withAppearance:appearance];
Language localization
The Onfido SDK supports and maintains translations for over 40 languages.
The strings used within the SDK can be customized by having a
Localizable.strings
in your app for the desired language
and by configuring the flow using the
withCustomLocalization()
method on the configuration builder.
Objective-C
@objc public func withCustomLocalization() { configBuilder.withCustomLocalization() // will look for localizable strings in your Localizable.strings file
For the list of languages supported by Onfido, please refer to our SDK customization documentation .
Note
: If no language is selected, the SDK will detect and use the end user's device language setting. If the device's language is not supported, the SDK will default to English (
en_US
).
Custom languages
The SDK can also be displayed in a custom language for locales that Onfido does not currently support. You can supply full or partial translations. For any key without a translation, the supported language default will be used.
When adding custom translations, you must add the whole set of keys included in the
Localizable.strings
file.
You can name the strings file with the translated keys as you desire but the name of the file will have to be provided
to the SDK as a parameter to the
withCustomLocalization()
method:
-
withCustomLocalization(andTableName: "MY_CUSTOM_STRINGS_FILE")
(Swift) -
[configBuilder withCustomLocalizationWithTableName:@"MY_CUSTOM_STRINGS_FILE"];
(Objective-C)
Additionally you can specify the bundle from which to read the strings file:
-
withCustomLocalization(andTableName: "MY_CUSTOM_STRINGS_FILE", in: myBundle)
(Swift) -
[configBuilder withCustomLocalizationWithTableName:@"MY_CUSTOM_STRINGS_FILE" in: myBundle];
(Objective-C)
Note :
- Any string translation change will result in a MINOR version release. Any custom translations you have should not be impacted by this if they have been implemented according to the guidance above
- You are responsible for ensuring the correct layout of any custom translations
To request a new language translation, or offer feedback or suggestions on the translations provided, you can get in touch with us at [email protected]
Handling callbacks
When the Onfido SDK session concludes, a range of callback functions may be triggered.
For advanced callbacks used for user analytics and returning submitted media, please refer to the Advanced Callbacks section of this document.
To receive the result from a completed workflow, you should pass a callback to the instance of
OnfidoFlow
. The following code is provided as an example:
Swift
onfidoRun.with(responseHandler: { (response: OnfidoResponse) in switch response { case .success: // User completed the flow case .cancel(let cancellationReason): // Flow cancelled by user print(cancellationReason) case .error(let error): // Error occurred print(error) dismissFlowOnCompletion: true) // Dismiss the whole flow when the user completes it, and return back to the integrator view
ATTRIBUTE | NOTES |
---|---|
.success | Callback that fires when all interactive tasks in the workflow have been completed. On success, if you have configured webhooks , a notification will be sent to your backend confirming the workflow run has finished. You do not need to create a check using your backend as this is handled directly by the workflow |
.error(Error) | Callback that fires when an error occurs |
.cancel |
Callback that fires when the workflow was exited prematurely by the user. The reason can be
.userExit
or
.consentDenied
|
Error handling
The
Error
object returned as part of
OnfidoResponse.error(Error)
is of type
OnfidoFlowError
. It's an enum with multiple cases depending on the error type.
switch response { case let OnfidoResponse.error(error): switch error { case OnfidoFlowError.cameraPermission: // This happens if the user denies permission to the SDK during the flow case OnfidoFlowError.failedToWriteToDisk: // This happens when the SDK tries to save capture to disk, maybe due to a lack of space case OnfidoFlowError.microphonePermission: // This happens when the user denies permission for microphone usage by the app during the flow case OnfidoFlowError.upload(let OnfidoApiError): // This happens when the SDK receives an error from an API call. // See https://documentation.onfido.com/#errors for more information case OnfidoFlowError.exception(withError: let error, withMessage: let message): // This happens when an unexpected error occurs. // Please email [email protected] when this happens case OnfidoFlowError.versionInsufficient: // This happens when you are using an older version of the iOS SDK and trying // to access a new functionality from workflow. You can fix this by updating the SDK default: // necessary because of Swift
Generating verification reports
While the SDK is responsible for capturing and uploading the user's media and data, identity verification reports themselves are generated based on workflows created using Onfido Studio .
For a step-by-step walkthrough of creating an identity verification using Onfido Studio and our SDKs, please refer to our Quick Start Guide .
If your application initializes the Onfido iOS SDK using the options defined in the Advanced customization section of this document, you may create checks and retrieve report results manually using the Onfido API. You may also configure webhooks to be notified asynchronously when the report results have been generated.
Advanced flow customization
This section on 'Advanced customization' refers to the process of initializing the Onfido iOS SDK without the use of Onfido Studio. This process requires a manual definition of the verification steps and their configuration.
These flow step parameters are mutually exclusive with
workflowRunId
, requiring an alternative method of instantiating the client and starting the flow.
Note that this initialization process is not recommended as the majority of new features are exclusively released for Studio workflows.
Managing SDK Token Expiry with
expireHandler
When generating SDK tokens , it's important to note that they expire after 90 minutes.
With this in mind, we recommend you use the optional
expireHandler
parameter in the SDK token configuration function to generate and pass a new SDK token when it expires. This ensures the SDK continues its flow even after an SDK token has expired.
For example:
Swift
func getSDKToken(_ completion: @escaping (String) -> Void) { // Your network request logic to retrieve SDK token goes here completion(myNewSDKtoken) let config = try OnfidoConfig.builder() .withSDKToken("<YOUR_SDK_TOKEN>", expireHandler: getSDKToken)
Objective-C
-(void) getSDKToken: (void(^)(NSString *)) handler { // <Your network request logic to retrieve SDK token goes here> handler(sdkToken); ONFlowConfigBuilder *configBuilder = [ONFlowConfig builder]; [configBuilder withSdkToken:@"YOUR_SDK_TOKEN" expireHandler:^(void (^ handler)(NSString * expireHandler)) { [self getSDKToken:handler];
Create the SDK configuration
Once you have added the SDK dependency , and you have an applicant ID, you can manually configure the SDK flow steps:
Swift
let config = try OnfidoConfig.builder() .withSDKToken("<YOUR_SDK_TOKEN>") .withWelcomeStep() .withDocumentStep() .withProofOfAddressStep() .withFaceStep(ofVariant: .photo(withConfiguration: nil)) .build() let onfidoFlow = OnfidoFlow(withConfiguration: config) .with(responseHandler: { results in // Callback when flow ends
Objective-C
ONFlowConfigBuilder *configBuilder = [ONFlowConfig builder]; [configBuilder withSdkToken:@"YOUR_SDK_TOKEN"]; [configBuilder withWelcomeStep]; [configBuilder withDocumentStep]; [configBuilder withProofOfAddressStep]; NSError *variantConfigError = NULL; Builder *variantBuilder = [ONFaceStepVariantConfig builder]; [variantBuilder withPhotoCaptureWithConfig: NULL]; [configBuilder withFaceStepOfVariant: [variantBuilder buildAndReturnError: &variantConfigError]]; if (variantConfigError == NULL) { NSError *configError = NULL; ONFlowConfig *config = [configBuilder buildAndReturnError:&configError]; if (configError == NULL) { ONFlow *onFlow = [[ONFlow alloc] initWithFlowConfiguration:config]; [onFlow withResponseHandler:^(ONFlowResponse *response) { // Callback when flow ends
Objective-C
NSError *runError = NULL; [onFlow runFrom:yourViewController animated:YES error:&runError completion:nil]; if (runError != NULL) { // do fallback logic
Swift
let appearance = Appearance() appearance.primaryColor = <DESIRED_UI_COLOR_HERE> appearance.primaryTitleColor = <DESIRED_UI_COLOR_HERE>
Objective-C
ONAppearance *appearance = [[ONAppearance alloc] init]; appearance.primaryColor = <DESIRED_UI_COLOR_HERE>; appearance.primaryTitleColor = <DESIRED_UI_COLOR_HERE>;
To apply the appearance, you can use the methods below:
Swift
let configBuilder = OnfidoConfig.builder() configBuilder.withAppearance(appearance)
Objective-C
ONFlowConfigBuilder *configBuilder = [ONFlowConfig builder]; [configBuilder withAppearance:appearance];
Please refer to the SDK customization documentation for details of the supported UI options that can be set in this property.
Flow customization
You can customize the flow of the SDK by adding steps to the SDK flow.
The possible steps include:
Step | Description |
---|---|
withWelcomeStep
|
Welcome screen shown to the user with preliminary instructions. Customization options include modification to the text elements and instructions shown to the user. |
withDocumentStep
|
Set of screens that control the capture via photo or upload of the user's document. Numerous customization options are available to define the document list presented to the user and the overall capture experience. |
withFaceStep
|
Set of screens that control the capture of a selfie, video or motion capture of the user. The customization options allow the selection of the capture variant. |
withProofOfAddressStep
|
Screen where the user selects the issuing country and type of document to verify their address . |
Welcome step
This step is the introduction screen of the SDK. It introduces the process and prepares the user for the steps they will need to complete.
While this screen is optional , we only recommend its removal if you already have your own identity verification welcome screen in place.
You can show the welcome screen by calling
configBuilder.withWelcomeStep()
in Swift
or
[configBuilder withWelcomeStep]
in Objective-C.
Objective-C
ONFlowConfigBuilder *configBuilder = [ONFlowConfig builder]; [configBuilder withSdkToken:@"YOUR_SDK_TOKEN_HERE"]; [configBuilder withWelcomeStep]; NSError *configError = NULL; ONFlowConfig *config = [configBuilder buildAndReturnError:&configError]; if (configError) { // Handle config build error } else { // use config
Consent step
This step contains the consent language required when you offer your service to US users, as well as links to Onfido's policies and terms of use. For applicants created with a
location
parameter value of the United States, consent collection is
mandatory
.
The user must click "Accept" to move past this step and continue with the flow. The content is available in English only, and is not translatable.
Note : This step does not automatically inform Onfido that the user has given their consent:
-
When creating checks using API v3.3 or lower, you need to set the value of the API parameter
privacy_notices_read_consent_given
(now deprecated) at the end of the SDK flow when creating a check - From API v3.4 onwards, user consent is confirmed when creating or updating an applicant using the consents parameter
If you choose to disable Onfido’s SDK Consent step, you must still incorporate the required consent language and links to Onfido's policies and terms of use into your own application's flow before your users start interacting with the Onfido SDK.
For more information about this step, and how to collect user consent, please visit Onfido Privacy Notices and Consent .
Document step
In the Document Capture step, an end user can select the issuing country and document type before capture. In a very limited number of cases, the end user may also be asked if they have a card or paper version of their document.
This information is used to optimize the capture experience, as well as inform the end user about which documents they are allowed to use.
This selection screen is dynamic, and will be automatically hidden where the end user is not required to indicate which document will be captured.
By default, the country selection will be pre-populated based on the end user’s primary SIM, but the end user can select another country from the list where allowed. The selection will default to empty when no SIM is present.
You can specify allowed issuing countries and document types for the document capture step in one of three ways:
- Onfido Studio: If you are using Onfido Studio, this is configured within the Document Capture task, as documented in the Studio Product Guide
-
Otherwise, the recommended approach is to apply this configuration globally in the
Dashboard
under Accounts \ Supported Documents. This option also ensures that the list is enforced as part of the Document Report validation. Any document that has been uploaded by an end user against your guidance will result in a Document Report sub-result of "rejected" and be flagged as
Image Integrity > Supported Document
.
Country and document type selection by Dashboard
Configuring the issuing country and document type selection step using your Dashboard is the recommended method of customization (available from iOS SDK version 28.0.0 and Android SDK version 16.0.0 onwards), as this configuration is also applied to your Document Reports.
We will be rolling out Dashboard-based configuration of allowed documents soon. In the meantime, contact [email protected] or your Customer Support Manager to request access to this feature.
- Open the Accounts tab on your Dashboard then click Supported Documents
- You will be presented with a list of all available countries and their associated supported documents. Make your selection, then click Save Change
Please note the following SDK behaviour:
- Hard coding any document type and issuing country configuration in your SDK integration will fully override the Dashboard-based settings
- Currently, only passport, national ID card, driving licence and residence permit are visible for document selection by the end user in the SDK. If you nominate other document types in your Dashboard (visa, for example), these will not be displayed in the user interface
- If you need to add other document types to the document selection screen, you can mitigate this limitation in the near-term, using the Custom Document feature
- If for any reason the configuration fails or is not enabled, the SDK will fallback to display the selection screen for the complete list of documents supported within the selection screens
Country and document type selection - SDK integration code
If you want to use your own custom document selection UI instead of displaying the Onfido document selection screen, you will need to specify the document details during SDK initialization.
The document selection screen will be skipped automatically when the single document type is specified.
The SDK will accept the following:
- The Document Type is required. This controls fundamental SDK document capture behaviour
- The Country is optional, but recommended. This enables any optimizations the SDK may have for this specific document issued by this country
-
The Document Format is optional, and only accepted for
French driving licence
,
Italian national identity card
and
South African national identity card
. This defaults to
Card
, representing modern forms of these documents. If the end user indicates that they have an older, paper version of one of these documents, useFolded
to ensure an optimized capture experience
Note : You may still wish to configure the Dashboard-based approach to ensure that the Document Report also rejects any document that has been uploaded by an end user against your guidance.
- Document type
The list of document types visible for the user to select can be shown or hidden using this option. Each document type has its own configuration class. While configuring document type, you can optionally pass a configuration object along with the document type.
The following document types are supported:
Document Type | Configuration Class | Configurable Properties |
---|---|---|
passport | PassportConfiguration | - country |
drivingLicence | DrivingLicenceConfiguration |
- country
- documentFormat |
nationalIdentityCard | NationalIdentityConfiguration |
- country
- documentFormat |
residencePermit | ResidencePermitConfiguration | - country |
visa | VisaConfiguration | - country |
workPermit | WorkPermitConfiguration | - country |
Note: If only one document type is specified, users will not see the selection screen and will be taken directly to the capture screen.
- Document country
Country configuration allows you to specify the country of origin of the document. This is optional, but recommended. This enables any optimizations the SDK may have for this specific document issued by this country.
You'll need to pass the corresponding ISO 3166-1 alpha-3 country code to the SDK.
Note
: You can specify country for all document types except
passport
. This is because passports have the same
format worldwide so the SDK does not require this additional information.
Note:
: The SDK will throw a
OnfidoConfigError.invalidCountryCode
(
ONFlowConfigErrorInvalidCountryCode
) error
if an invalid country code is provided.
For example, to only capture UK driving licenses:
Swift
let config = try OnfidoConfig.builder() .withSDKToken("<YOUR_SDK_TOKEN_HERE>") .withDocumentStep(ofType: .drivingLicence(config: DrivingLicenceConfiguration(country: "GBR"))) .build()
Objective-C
ONFlowConfigBuilder *configBuilder = [ONFlowConfig builder]; [configBuilder withSdkToken:@"YOUR_SDK_TOKEN_HERE"]; NSError *documentConfigError = NULL; DocumentConfigBuilder *documentConfigBuilder = [ONDocumentTypeConfig builder]; [documentConfigBuilder withDrivingLicenceWithConfig:[[DrivingLicenceConfiguration alloc] initWithCountry: @"GBR"]]; ONDocumentTypeConfig *documentTypeConfig = [documentConfigBuilder buildAndReturnError: documentConfigError]; if (documentConfigError) { // Handle variant config error } else { NSError *configError = NULL; [configBuilder withDocumentStepOfType:documentTypeConfig]; ONFlowConfig *config = [configBuilder buildAndReturnError:&configError];
- Document format
The Document Format is
optional
, and only accepted for
French driving licence
,
Italian national identity card
and
South African national identity card
. This defaults to
Card
, representing modern forms of these documents. If the end user indicates that they have an older, paper version of one of these documents, use
Folded
to ensure an optimized capture
experience.
If
Folded
is configured, the SDK will show a specific template overlay during document capture.
The following document formats are supported for each document type:
Document Type/ Document Format | card | folded |
---|---|---|
drivingLicence | ALL COUNTRIES | Only France (Country code "FRA") |
nationalIdentityCard | ALL COUNTRIES |
Italy (Country code "ITA")
South Africa (Country code "ZAF") |
Document Type/ Document Format | |
---|---|
passport | NOT CONFIGURABLE |
residencePermit | NOT CONFIGURABLE |
visa | NOT CONFIGURABLE |
workPermit | NOT CONFIGURABLE |
Note:
If you configure the SDK with an unsupported document format, the SDK will throw
an
OnfidoConfigError.invalidDocumentFormatAndCountryCombination
(
ONFlowConfigErrorInvalidDocumentFormatAndCountryCombination
in Objective-C) error during runtime.
For example, for a folded Italian national identity card:
Swift
let config = try OnfidoConfig.builder() .withSDKToken("YOUR_SDK_TOKEN_HERE") .withDocumentStep(ofType: .nationalIdentityCard(config: NationalIdentityConfiguration(documentFormat: .folded, country: "ITA"))) .build()
Objective-C
ONFlowConfigBuilder *configBuilder = [ONFlowConfig builder]; [configBuilder withSdkToken:@"YOUR_SDK_TOKEN_HERE"]; NSError *documentConfigError = NULL; DocumentConfigBuilder *documentConfigBuilder = [ONDocumentTypeConfig builder]; [documentConfigBuilder withNationalIdentityCardWithConfig:[[NationalIdentityConfiguration alloc] initWithDocumentFormat:DocumentFormatFolded country: @"ITA"]]; ONDocumentTypeConfig *documentTypeConfig = [documentConfigBuilder buildAndReturnError: documentConfigError]; if (documentConfigError) { // Handle variant config error } else { NSError *configError = NULL; [configBuilder withDocumentStepOfType:documentTypeConfig]; ONFlowConfig *config = [configBuilder buildAndReturnError:&configError];
- Customize the issuing country and document type selection screen with pre-selected documents
You can also customize the screen to display only a limited list of document types, using the configuration function to specify the ones you want to show.
Currently you can only include
passport
,
identityCard
,
drivingLicence
,
residencePermit
in the list.
For example, to show only the
passport
and
drivingLicence
document types:
Swift
let config = try OnfidoConfig.builder() .withDocumentStep(ofSelectableTypes: [.passport, .drivingLicence])
Objective-C
ONFlowConfigBuilder *configBuilder = [ONFlowConfig builder]; [configBuilder withDocumentStepWithSelectableDocumentTypes: @[@(SelectableDocumentTypePassport), @(SelectableDocumentTypeDrivingLicence)]];
Objective-C
For the
Objective-C interface
, you should use
ONFaceStepVariantConfig
as shown below.
To configure for a live photo :
NSError * error; Builder * variantBuilder = [ONFaceStepVariantConfig builder]; [variantBuilder withPhotoCaptureWithConfig: [[PhotoStepConfiguration alloc] initWithShowSelfieIntroScreen: YES]]]; [configBuilder withFaceStepOfVariant: [variantBuilder buildAndReturnError: &error]];
To configure for a live video :
NSError * error; Builder * variantBuilder = [ONFaceStepVariantConfig builder]; [variantBuilder withVideoCaptureWithConfig: [[VideoStepConfiguration alloc] initWithShowIntroVideo: YES manualLivenessCapture: NO]]; [configBuilder withFaceStepOfVariant: [variantBuilder buildAndReturnError: &error]];
To configure for Motion :
NSError * error; Builder * variantBuilder = [ONFaceStepVariantConfig builder]; [variantBuilder withMotionWithConfig: NULL]; [configBuilder withFaceStepOfVariant: [variantBuilder buildAndReturnError: &error]];
To configure for Motion with audio recording :
NSError * error; Builder * variantBuilder = [ONFaceStepVariantConfig builder]; [variantBuilder withMotionWithConfig: [[MotionStepConfiguration alloc] initWithRecordAudio: YES]]; [configBuilder withFaceStepOfVariant: [variantBuilder buildAndReturnError: &error]];
Swift
The Face step has 3 variants for the Swift interface :
-
FaceStepVariant.photo(with: PhotoStepConfiguration?)
-
FaceStepVariant.video(with: VideoStepConfiguration?)
-
FaceStepVariant.motion(with: MotionStepConfiguration?)
To configure for a live photo :
let config = try OnfidoConfig.builder() .withSDKToken("<YOUR_SDK_TOKEN_HERE>") .withWelcomeStep() .withDocumentStep() .withFaceStep(ofVariant: .photo(withConfiguration: PhotoStepConfiguration(showSelfieIntroScreen: true))) .build()
To configure for a live video :
let config = try OnfidoConfig.builder() .withSDKToken("<YOUR_SDK_TOKEN_HERE>") .withWelcomeStep() .withDocumentStep() .withFaceStep(ofVariant: .video(withConfiguration: VideoStepConfiguration(showIntroVideo: true, manualLivenessCapture: false))) .build()
To configure for Motion :
let config = try OnfidoConfig.builder() .withSDKToken("<YOUR_SDK_TOKEN_HERE>") .withWelcomeStep() .withDocumentStep() .withFaceStep(ofVariant: .motion(withConfiguration: nil)) .build()
To configure for Motion with audio recording :
let config = try OnfidoConfig.builder() .withSDKToken("<YOUR_SDK_TOKEN_HERE>") .withWelcomeStep() .withDocumentStep() .withFaceStep(ofVariant: .motion(withConfiguration: MotionStepConfiguration(recordAudio: true))) .build()
Swift
let config = try OnfidoConfig.builder() .withSDKToken("<YOUR_SDK_TOKEN_HERE>") .withProofOfAddressStep() .build()
Objective-C
ONFlowConfigBuilder *configBuilder = [ONFlowConfig builder]; [configBuilder withSdkToken:@"YOUR_SDK_TOKEN_HERE"]; [configBuilder withProofOfAddressStep]; NSError *configError = NULL; ONFlowConfig *config = [configBuilder buildAndReturnError:&configError]; if (configError) { // Handle config build error } else { // use config
Swift
To receive the result from the flow, you should pass a callback to the instance of
OnfidoFlow
.
The result object passed to the callback may include the following attributes:
let responseHandler: (OnfidoResponse) -> Void = { response in switch response { case .error(let error): case .success(let results): case .cancel(let reason):
Attribute | Notes |
---|---|
.success([OnfidoResult])
|
User completed the flow. You can now create a check on your backend server. |
.error(Error)
|
Callback that fires when an error occurs. |
.cancel
|
Flow was cancelled by the user. The reason can be
.userExit
(when the user taps back button on the first screen) or
.deniedConsent
(when the user denies consent on
the consent screen
) or
.requiredNFCFlowNotCompleted
(when the NFC step is required and the user did not complete it).
|
Objective-C
To receive the result from the flow, you should pass a callback to the instance of
ONFlow
.
An instance of
ONFlowResponse
is passed back to the callback with 3 properties:
(^responseHandlerBlock)(ONFlowResponse *response) { if (response.userCanceled) { } else if (response.results) { } else if (response.error) {
Properties | Notes |
---|---|
results
|
User completed the flow. You can now create a check on your backend server. |
error
|
Callback that fires when an error occurs. |
userCanceled
|
Flow was cancelled by the user. You can check why the user cancelled using
response.userCanceled.reason
. When
userCanceled
is false, then
results
or
error
properties will be set.
|
Swift
[OnfidoResult]
is a list with multiple results. The results are different enum values, each with its own associated
value (also known as payload). This enum,
OnfidoResult
, can have the following values:
-
OnfidoResult.document
andOnfidoResult.face
: Its payload is relevant in case you want to manipulate or preview the captures in some way.
Capture result payload
You shouldn't need to inspect the results of the document and face captures as the SDK handles file uploads. However, if you want to see further information, you can access the result object.
Example for a document capture:
let document: Optional<OnfidoResult> = results.first { result in if case OnfidoResult.document = result { return true } return false if let document, case OnfidoResult.document(let documentResult) = document { print(document.front.id)
To access the result object for a face capture, input the
case
as
OnfidoResult.face
.
Objective-C
[ONFlowResult]
is a list with multiple results. The result is an instance of
ONFlowResult
containing 2 properties:
-
type
, which is an enum with valuesONFlowResultTypeDocument
,ONFlowResultTypeFace
-
result
, whose instance type can be ofONDocumentResult
orONFaceResult
. The result type can be derived by thetype
property
Capture result payload
You shouldn't need to inspect the results of the document and face captures as the SDK handles file uploads. However, if you want to see further information, you can access the result object.
Example for a document capture:
NSPredicate *documentResultPredicate = [NSPredicate predicateWithBlock:^BOOL(id flowResult, NSDictionary *bindings) { if (((ONFlowResult *)flowResult).type == ONFlowResultTypeDocument) { return YES; } else { return NO; NSArray *flowWithDocumentResults = [results filteredArrayUsingPredicate:documentResultPredicate]; if (flowWithDocumentResults.count > 0) { ONDocumentResult *documentResult = ((ONFlowResult *)flowWithDocumentResults[0]).result; NSLog(@"%@", documentResult.front.id);
To access the result object for a face capture, change the type to
ONFlowResultTypeFace
.
Response Handler Errors
The
Error
object returned as part of
OnfidoResponse.error(Error)
is of type
OnfidoFlowError
. It's an enum with
multiple cases depending on the error type.
switch response { case let OnfidoResponse.error(error): switch error { case OnfidoFlowError.cameraPermission: // Occurs if the user denies permission to the SDK during the flow case OnfidoFlowError.microphonePermission: // Occurs when the user denies permission for microphone usage by the app during the flow case OnfidoFlowError.failedToWriteToDisk: // Occurs when the SDK tries to save capture to disk, maybe due to a lack of space case OnfidoFlowError.upload(let OnfidoApiError): // Occurs when the SDK receives an error from an API call, see [https://documentation.onfido.com/#errors](https://documentation.onfido.com/#errors) for more information case OnfidoFlowError.exception(withError: let error, withMessage: let message): // Returned when an unexpected error occurs, please contact [[email protected]](mailto:[email protected]?Subject=ISSUE%3A) when this happens case OnfidoFlowError.invalidImageData: // Occurs when the SDK tries to save capture to disk, but the image failed to compress to JPEG data case OnfidoFlowError.versionInsufficient: // Occurs when the workflow version is insufficient default: // necessary because swift
Note
: Not all errors will be passed to
OnfidoResponse.error
.
Run Exceptions
and
Configuration errors
will be returned as an exception.
Run exceptions
When initiating the SDK there can be an exception.
You can handle run exceptions in Swift with a
do/catch
as shown below:
Configuration errors
You must provide the following when configuring the Onfido iOS SDK:
- SDK token
- applicant
- at least one capture step
Otherwise, you may encounter the following errors when calling the
build()
function on the
OnfidoConfig.Builder
instance:
Error | Notes |
---|---|
OnfidoConfigError.missingSDKToken
|
When no token is provided or the token is an empty string. |
OnfidoConfigError.invalidSDKToken
|
When an invalid token is provided. |
OnfidoConfigError.missingSteps
|
When no step is provided. |
OnfidoConfigError.invalidDocumentFormatAndCountryCombination
|
When it is an unsupported document format for the specified country provided. See Document Type Configuration to check supported combinations. |
OnfidoConfigError.invalidCountryCode
|
When an invalid country code is provided. |
Response Handler Errors
The
error
property of the
ONFlowResponse
is of type
NSError
.
You can identify the error by comparing the
code
property of the
NSError
instance with
ONFlowError
,
i.e.
response.code == ONFlowErrorCameraPermission
. You can also print or log the
userInfo
property of the
NSError
instance.
The
NSError
contained within the
ONFlowResponse
's
error
property can be handled as follows:
switch (error.code) { case ONFlowErrorCameraPermission: // Occurs if the user denies permission to the SDK during the flow break; case ONFlowErrorMicrophonePermission: // Occurs when the user denies permission for microphone usage by the app during the flow break; case ONFlowErrorFailedToWriteToDisk: // Occurs when the SDK tries to save capture to disk, maybe due to a lack of space break; case ONFlowErrorUpload: // Occurs when the SDK receives an error from an API call, see [https://documentation.onfido.com/#errors](https://documentation.onfido.com/#errors) for more information // you can find out more by printing or logging userInfo from error break; case ONFlowErrorException: // Returned when an unexpected error occurs, please contact [[email protected]](mailto:[email protected]?Subject=ISSUE%3A) when this happens break; case ONFlowErrorInvalidImageData: // Occurs when the SDK tries to save capture to disk, but the image failed to compress to JPEG data break; case ONFlowErrorVersionInsufficient: // Occurs when the workflow version is insufficient break;
Note
: Not all errors which are part of
ONFlowError
will be passed to the response handler
block.
Run Exceptions
and
Configuration errors
will be returned as an
exception.
Run exceptions
You can handle run exceptions as shown below:
NSError *runError = NULL; [onFlow runFrom:yourViewController animated:YES error:&runError completion:nil]; //`yourViewController` should be your view controller if (runError) { switch (runError.code) { case ONFlowErrorCameraPermission: // do something about it here break; case ONFlowErrorMicrophonePermission: // do something about it here break; default: // do something about it here break;
Configuration errors
You must provide the following when configuring the Onfido iOS SDK:
- SDK token
- applicant
- at least one capture step
Otherwise you may encounter the following errors when calling the
build()
function on the
ONFlowConfigBuilder
:
Error | Notes |
---|---|
ONFlowConfigErrorMissingToken
|
When no token is provided or the token is an empty string. |
ONFlowConfigErrorMissingApplicant
|
When no applicant instance is provided. |
ONFlowConfigErrorMissingSteps
|
When no step is provided. |
ONFlowConfigErrorMultipleTokenTypes
|
When both an SDK token and a Mobile token are provided. |
ONFlowConfigErrorApplicantProvidedWithSDKToken
|
When both an SDK token and an applicant are provided. |
ONFlowConfigErrorInvalidDocumentFormatAndCountryCombination
|
When it is an unsupported document format for the specified country provided. See Document Type Configuration to check supported combinations. |
ONFlowConfigErrorInvalidCountryCode
|
When an invalid country code is provided. |
Introduction
Onfido provides the possibility to integrate with our Smart Capture SDK, without the requirement of using this data only through the Onfido API. Media callbacks enable you to control the end user data collected by the SDK after the end user has submitted their captured media. As a result, you can leverage Onfido’s advanced on-device technology, including image quality validations, while still being able to handle end users’ data directly. This unlocks additional use cases, including compliance requirements and multi-vendor configurations, that require this additional flexibility.
This feature must be enabled for your account. Please contact your Onfido Solution Engineer or Customer Success Manager.
Swift
final class SwiftDynamicFrameworkOnfidoRunner: OnfidoRunner, MediaCallback { func onMediaCaptured(result: MediaResult) { switch result { case let documentResult as MediaDocumentResult: // Your callback code here case let selfieResult as SelfieResult: // Your callback code here case let livenessResult as LivenessResult: // Your callback code here default: break init() { configBuilder.withMediaCallback(mediaCallback: self)
User data
The callbacks return an object including the information that the SDK normally sends directly to Onfido. The callbacks are invoked when the end user confirms submission of their image through the SDK’s user interface.
Note: Currently, end user data will still automatically be sent to the Onfido backend, but you are not required to use Onfido to process this data.
The callback returns 3 possible objects:
-
For documents, the callback returns a
MediaDocumentResult
object:
class MediaDocumentResult { let metadata: DocumentMetadata let file: MediaFile
The
DocumentMetadata
object contains the metadata of the captured document:
class DocumentMetadata { let side: String let type: String let issuingCountry: String?
Note:
issuingCountry
is optional based on end-user selection, and can be
null
.
Note:
If a document was scanned using NFC, the callback will return the passport photo in
file
, but no additional
data.
-
For live photos, the callback returns a
SelfieResult
object:
class SelfieResult { let fileData: MediaFile
-
For videos, the callback returns a
LivenessResult
object:
class LivenessResult { let fileData: MediaFile
And the
MediaFile
object has:
class MediaFile { let fileData: Data let fileName: String let fileType: String
Overriding the hook
In order to expose a user's progress through the SDK, a hook method must be defined while creating the
OnfidoFlow.swift
instance using a
.with(eventHandler: EventHandler)
call. For example:
OnfidoFlow(withConfiguration: config) .with(eventHandler: { (event: Event) -> () in // Your code here
The code inside of the defined method will now be called when a particular event is triggered, usually when the user reaches a new screen. For a full list of events see, tracked events .
The parameter being passed in is an
OnfidoFlow.Event
struct which contains the following:
eventName
|
string
Indicates the type of event. This will always be returned as
"Screen"
, as each tracked event is a user visiting a screen.
|
properties
|
dictionary
Contains the specific details of an event. For example, the name of the screen visited. |
Tracked events
Below is the list of potential events currently being tracked by the hook:
WELCOME - User reached the "Welcome" screen USER_CONSENT - User reached "User consent" screen DOCUMENT_CAPTURE - User reached the "Document capture" screen (for one-sided document) DOCUMENT_CAPTURE_FRONT - User reached the "Document capture" screen for the front side (for two-sided document) DOCUMENT_CAPTURE_BACK - User reached the "Document capture" screen for the back side (for two-sided document) DOCUMENT_CAPTURE_CONFIRMATION - User reached the "Document confirmation" screen (for one-sided document) DOCUMENT_CAPTURE_CONFIRMATION_FRONT - User reached the "Document confirmation" screen for the front side (for two-sided document) DOCUMENT_CAPTURE_CONFIRMATION_BACK - User reached the "Document confirmation" screen for the back side (for two-sided document) DOCUMENT_UPLOAD - User's document is uploading FACIAL_INTRO - User reached the "Selfie intro" screen FACIAL_CAPTURE - User reached the "Selfie capture" screen FACIAL_CAPTURE_CONFIRMATION - User reached the "Selfie confirmation" screen FACIAL_UPLOAD - User's selfie is uploading VIDEO_FACIAL_INTRO - User reached the "Liveness intro" screen VIDEO_FACIAL_CAPTURE - User reached the "Liveness video capture" screen VIDEO_FACIAL_CAPTURE_STEP_1 - User reached the 1st challenge during "Liveness video capture", challenge_type can be found in eventProperties VIDEO_FACIAL_CAPTURE_STEP_2 - User reached the 1st challenge during "Liveness video capture", challenge_type can be found in eventProperties VIDEO_FACIAL_CAPTURE_CONFIRMATION - User reached the "Liveness video confirmation" screen VIDEO_FACIAL_UPLOAD - User's liveness video is uploading MOTION_FACIAL_INTRO - User reached the "Motion intro" screen MOTION_FACIAL_ALIGNMENT - User reached the "Motion alignment" screen MOTION_FACIAL_CAPTURE - User reached the "Motion capture" screen MOTION_FACIAL_NO_FACE_DETECTED - User's face was not detected MOTION_FACIAL_CAPTURE_ERROR_TIMEOUT - User's motion capture timed out MOTION_FACIAL_CAPTURE_ERROR_TOO_FAST - User performed the motion head turn too fast MOTION_FACIAL_UPLOAD - User's motion capture is uploading MOTION_FACIAL_UPLOAD_COMPLETED - User's motion capture finished uploading MOTION_FACIAL_CONNECTION_ERROR - User was presented the "Motion connection error" screen during upload
Migrating
You can find the migration guide at MIGRATION.md
Certificate pinning
Note : Certificate pinning works only on devices running on iOS 10.3 or above.
You can pin any communications between our SDK and server through the
.withCertificatePinning()
method in
our
OnfidoConfig.Builder
configuration builder. This method accepts
CertificatePinningConfiguration
as a parameter,
with sha-256 hashes of the certificate's public keys.
For more information about the hashes, please email [email protected] .
Swift
let config = try OnfidoConfig.builder() config.withCertificatePinning(try CertificatePinningConfiguration(hashes: ["<EXAMPLE_HASH>"])) } catch { // handle CertificatePinningConfiguration initialisation failures. i.e Providing empty array causes initializer to be failed. configBuilder.build()
Objective-C
ONFlowConfigBuilder * builder =[ONFlowConfig builder]; NSError * error = NULL; ONCertificatePinningConfiguration * pinningConf = [[ONCertificatePinningConfiguration alloc] initWithHashes: @[@"<EXAMPLE_HASH>"] error: &error]]; if (error != NULL) { // handle ONCertificatePinningConfiguration initialisation failures. i.e Providing empty array causes initializer to be failed. [builder withCertificatePinningConfiguration: pinningConf];
Handling certificate pinning error
To identify a certificate pinning error, check the
message
property of the
OnfidoFlowError.exception
object. It will
return
invalid_certificate
for certificate pinning related errors.
let responseHandler: (OnfidoResponse) -> Void = { response in switch response { case let .error(error): // Some error happened if case OnfidoFlowError.exception(withError: _, withMessage: let optionalMessage) = error, let message = optionalMessage { if message == "invalid_certificate" { // HANDLE INVALID CERTIFICATE CASE HERE case let .success(results): // User completed the flow // You can create your check here case .cancel: // Flow cancelled by the user
Accessibility
The Onfido SDKs are WCAG 2.1 compliant to level AA. They have been optimized to provide the following accessibility support by default:
- Screen reader support: accessible labels for textual and non-textual elements available to aid VoiceOver navigation, including dynamic alerts
- Dynamic font size support: all elements scale automatically according to the device's font size setting
- Sufficient color contrast: default colors have been tested to meet the recommended level of contrast
- Sufficient touch target size: all interactive elements have been designed to meet the recommended touch target size
Refer to our accessibility statement for more details.
Licensing
Due to API design constraints, and to avoid possible conflicts during the integration, we bundle some of our 3rd party dependencies. For those, we include the licensing information inside our bundle and also in this repo under license folder, with the file named onfido_licenses.json . This file contains a summary of our bundled dependencies and all the licensing information required, including links to the relevant license texts contained in the same folder. Integrators of our library are then responsible for keeping this information along with their integrations.
Example on how to access the licenses:
let onfidoBundle = Bundle(for: OnfidoFlow.self) guard let licensesPath = onfidoBundle.path(forResource: "onfido_licenses", ofType: "json", inDirectory: nil), let licensesData = try? Data(contentsOf: URL(fileURLWithPath: licensesPath)), let licensesContent = String(data: licensesData, encoding: .utf8) else { return print(licensesContent) guard let mitLicensePath = onfidoBundle.path(forResource: "onfido_licenses_mit", ofType: "txt", inDirectory: nil), let mitLicenseData = try? Data(contentsOf: URL(fileURLWithPath: mitLicensePath)), let mitLicenseFileContents = String(data: mitLicenseData, encoding: .utf8) else { return print(mitLicenseFileContents)
Support
Should you encounter any technical issues during integration, please contact Onfido’s Customer Support team via email , including the word ISSUE: at the start of the subject line.
Alternatively, you can search the support documentation available via the customer experience and this project adheres to Semantic Versioning .
Note : If the strings translations change it will result in a MINOR version change, therefore you are responsible for testing your translated layout in case you are using custom translations. More on language localisation
Added
- Added UIAccessibilityTraitButton for 'CAN'T FIND YOUR COUNTRY' button in the Country Selection Screen
-
Added Motion support for all devices: Older iPhones and all iPads now also supported. Motion capture fallback configuration has therefore been deprecated.
-
If you currently set
recordAudio
, useMotionStepConfiguration(recordAudio:)
instead. If not, usenil
instead ofMotionStepConfiguration(captureFallback:)
.
-
If you currently set
Changed
- NFC enforcement (through Studio) and UI/UX improvements added
- Due to a change introduced by Apple in March 2023 with iOS v16.0, PACE-only documents can no longer be read by iOS devices installed with iOS 16 (or newer). To minimise integration complexity and instability with future releases of iOS, Onfido is removing support for NFC-PACE.
Fixed
- Fixed issue where enterprise features were ignored for studio flows
- Fixed Selfie confirmation screen text not being visible in Dark Mode and not using the custom font set
- Fixed rare race condition that could cause Motion to crash
- Fixed camera permissions checks to handle camera being restricted through "Content & Privacy restrictions"
- Fixed showing a loading placeholder when configuring face step without intro video
Added
- Ability to customise logo and branding available on all Motion screens. This is an enterprise feature, please reach out to your CSM if you want to know more
- Added translations for live feedback on wrong passport page or tilted document
- Added screen background colour customisation
-
Introduced
InterfaceStyle
which enables you to either force set the dark/light theme, or follow the device’s system setting. The previous attributesupportDarkMode
is now deprecated. Please use this instead. More details can be found here - When using Studio, Selfie and Video are configured based on the configuration set in Studio
Changed
- Adjust colour contrast of brackets in Headturn step in motion
- Adjust colour contrast of corners in Alignment step in motion
- Added feedback on UI while video is being recorded on document capture
- Increase document overlay width to 90% for all devices that do not have a 16:9 screen.
- Removed OnfidoExtended framework variant
Fixed
- Fixed umbrella header importing private header files
- Added missing Norwegian localisations for document capture. Improved Hungarian message for wrong document side detected.
- Fixed missing country setting issue on document capture Studio flow which affects capture UX and validations
- Fixed incorrect image quality messages being reported on document confirmation screen after 3 attempts
- Disabled swipe to dismiss gesture on loading screen in model presentation contexts
- Fixed reporting the incorrect NFC Media ID in flow response
- Fixed USA and Canadian API calls that were incorrectly calling EU servers
- Fixed endless spinner appearing when navigating back from document capturing screen
Added
- Ability to customise logo and branding available on all Motion screens. This is an enterprise feature, please reach out to your CSM if you want to know more
- Adding translations for live feedback on wrong passport page or tilted document.
- Enable screen background colour customisation
- Enable explicitly setting the user interface style
- When using Studio, Selfie and Video are configured based on the configuration set in Studio
- Fixed endless spinner appearing when navigating back from document capturing screen
Fixed
- Fixed umbrella header importing private header files
- Added missing Norwegian localisations for document capture. Improved Hungarian message for wrong document side detected.
- Fixed missing country setting issue on document capture Studio flow which affects capture UX and validations
- Fixed incorrect image quality messages being reported on document confirmation screen after 3 attempts
- Disabled swipe to dismiss gesture on loading screen in model presentation contexts
- Fixed reporting the incorrect NFC Media ID in flow response
Added
- Enable consent screen buttons only when user scrolls to bottom of text
- Added experimental feature to detect and validate document on device
- Add swipe gesture for navigating back to previous viewControllers
-
Enabled NFC by default in
OnfidoConfig
. Addeddisable()
for disabling it -
Deprecated
withNFCReadFeature()
inOnfidoConfig
- Combined NFC Intro & Read screens into single Scan screen
- Add back swipe gesture for Photo, Video and Motion capture screens
Fixed
- Fixed crashing at end of the Studio flow in loading screen
- Fixed error message to give a more accurate reason to the user when there is a missing media type connection error
- UI: Fixed the issue which caused standard font to be shown even when the custom font feature was enabled
- Fixed wrong screen being displayed and no error being returned after microphone permission denied
- Fixed the issue where it was not possible to dismiss the SDK after the consent screen was shown
-
Fixed missing document types (Visa, Work permit, Generic) for customized
withDocumentStep
API
Changed
- Removed mobile token support
- Dropped iOS 10 support. Now supporting iOS 11 or newer.
- Removed initialisers with parameters for Appearance (ONAppearance) and CaptureSuccessColors (ONCaptureSuccessColors), and made properties public.
- Renamed withPassportNFCReadBetaFeatureEnabled sdk configuration function to withNFCReadBetaFeatureEnabled.
- Removed EnterpriseFeature convenience initialiser. Use EnterpriseFeatures.builder().withHideOnfidoLogo(_:).build() instead.
Changed
- Accessibility: improved instructions for capturing various document types
- Accessibility: improved instructions for selfie camera capture
- Now returning a single document and face result object. Only last capture returned.
- Accessibility: announcing number of results when searching for countries
- UI: Now showing auto capure message below capture frame area. Same as manual capture.
- UI: Now showing capture instructions at all times even when warning present to user
- Accessibility: improved the instruction for selfie and video capture
- Accessibility: added reference that video is being played on intro video screen
- UI: Now showing spinner instead of deterministic progress bar
Changed
- UI: Now primary button is retake and secondary is confirm on capture confirmation screen when warning present
- Made some improvements around video recording logic to prevent several crash issues which have been reported on github. Issue 1 , Issue 2 . Those issues are: https://github.com/onfido/onfido-ios-sdk/issues/227
Added
- Added Canadian driver's license autocapture as an experimental feature. Follow README to understand how to enable this feature
Changed
- UI: Changed text and background colors in light mode
- Now sharing Onfido license files in github repository along with SDK bundle
- UI: Changed Onfido logo position in capture screens
- UI: Changed Onfido logo position in intro and permission screens
- UI: Added Onfido logo to the document type selection screen
- Removed unused strings from localisation
- Renamed some generic keys
- UI: Changed bubble view position and appearance for document capture flow
- Now disabling passport autocapture on simulators
Changed
- Renamed most localisation keys. Now names are more explicit to in which screens they are used. See MIGRATION to easily migrate Strings from 18.7.0 to 18.8.0 .
Fixed
- Fixed bundle localisation issue. Related Github issue
Fixed
- UI: Fix the problem about having buttons in different height. Github Issue
- Fixed localisation language selection when app and device preferred language is not supported by Bundle
Fixed
- Fix for sending duplicate VIDEO_FACIAL_CAPTURE_CONFIRMATION analytic event. Related github issue
- Improved memory usage
- UI: Fixed the camera load problem in some specific cases
- UI: Fixed incorrect VoiceOver focus on video capture intro video
- UI: Fixed error problem user taps shutter button right after presenting SDK. Related github issue
Changed
- UI: Changed continuous glare detection logic for US DL documents
- UI: Autocapture manual fallback alert UI has changed
- UI: No longer running glare validation on back side of Romanian identity card
- Added eventHandler and corresponding event method to ONFlow.swift for User Analytic Events
- UI: Improved US Driver Licence edge detection
- Sending barcode detection result to the API
Fixed
- Fixed SDK crash when invalid SDK token provided
- Fixed sdk not showing document format selection when document type and country preselected but no format specified
- UI: Fix the issue related with having incorrect navigation bar theme when dark mode disabled for SDK
- UI: Now showing upload progress when user taps upload button immediately
Added
- Added German as supported language
- Added document format option for document capture step. Also changed the way to configure document capture step. Please check README for the details
- Added integrator defined event hook to allow integrators to collect user analytics
- UI: Added icon to differentiate document back capture from front capture
Fixed
- Fixed the Localizable.strings not updated problem. See
- UI: Fixed missing right margin issue on selfie intro screen
- UI: Fixed alert text cut off in some scenarios
- UI: Fixed the text cut-off issue on liveness capture screen
Added
- Added certificate pinning support. See https://github.com/onfido/onfido-ios-sdk#certificate-pinning for the details.
Changed
- UI: Now using grey Onfido logo with higher contrast for accessibility
- Now using API v3 for communication with the backend.
- UI: Now only detecting glare on rectangles of ID1 size on US DL autocapture
- UI: Now auto capturing non-blurry US DL only
- Updated bubble view design and updated barcode not readable copy
- Removed deprecated withApplicant() function from public API. Please check migration document to understand what needs to be done.
- UI: Updated liveness capture head turn challenge design
- Updated code snippets and descriptions about API v2 with API v3 in README.
- UI: Selfie oval now same as liveness oval size
- Updated README to include bitcode support information
- UI: Updated flow intro screen user interface
- Updated mrz not detected error copy
- Changed 'mobile sdk token' expression with 'mobile token' on README to prevent confusion
- UI: Now running selfie capture validation on device instead of back-end
- UI: Now showing selfie capture post upload errors in bubble view instead of using pop-ups
- UI: Now loading selfie intro screen purely from code; Removed Xib file
Fixed
- Fixed folded paper document on back capture loading lag issue
- UI: Fixed selfie capture text truncated when large text size used
- UI: Fixed Arabic country name endonyms
- Fixed warning about missing umbrella header ( https://github.com/onfido/onfido-ios-sdk/issues/131 )
Added
- UI: User can choose to capture folded paper documents for French driving license and italian identity document
- UI: Now checking face is in document captured when document must contain face
- UI: Now showing error message when passport MRZ is cut off in captured image
- Now changing document capture frame ratio for folded paper documents and showing document template for 4 seconds
- Now showing passport template when user selects passport capture
Fixed
- UI: Fixed white background shown on camera capture screens
- Cocoapods documentation is now pointing to GitHub README
Changed
- UI: Now showing manual capture option on retake when autocapturing US DL
- UI: Now showing manual capture for US DL when only barcode detected
- Updated README to explain how to obtain sandbox token
- Changed carthage spec json file name. Please check the README for the details.
- Now captured images include EXIF meta data.
Added
- Carthage support added, please check the README for the details.
Fixed
- UI: Fixed the UI bug which affects navigation bar in camera screens when integrator uses global appearance customisation for the navigation bar
- UI: Fixed the issue that causes showing constraint warnings in the console when user goes to the any camera capture screen
- UI: VoiceOver focuses on back button instead of take new picture on capture confirmation screen when transitioning between photo capture to capture confirmation
- Fixed Segment SDK crash issues, upgraded Segment SDK version to 3.7.0
Added
- Added ability to refresh SDK token when its expired
- UI: Added dark mode support for iOS 13. See the https://github.com/onfido/onfido-ios-sdk#ui-customisation page for the details.
Changed
- UI: When auto capturing a US DL, the transition to manual capture will only happen after 10 seconds of the first document is detected (even if not aligned)
- UI: Changed document not found pop-up for error bubble on capture confirmation upload
- US driving license autocapture now default feature.
Fixed
- UI: Fixed the not being able to set correct font issue on iOS 13
- UI: Fix for the separator disappear problem when any document type tapped on iOS 13
- UI: Fixed the not showing unsupported orientation view for flow intro and selfie intro screens when device in horizontal mode
- UI: Fixed the crash on liveness head turn challenge screen when head turn animation and tapping next button happened at the same time
- UI: Fixed liveness intro video player and video reload showing at the same time
- UI: Error bubble view on capture confirmation view cut off on iPad modal
Added
- Added United States' driver's license autocapture as an experimental feature. Can be enabled by calling withUSDLAutocapture() in the OnfidoConfig.builder()
- Updated README with adding SDK size impact information
- UI: Added dynamic font size support for video capture confirmation screen
- UI: Added support for the new token format
Fixed
- UI: Unsupported screen appears and gets stuck in app only supporting portrait mode
- UI: Fixed the UI issue about showing unnecessary oval shape in upload progress bar view
- UI: Poland's endonym on country selection screen
- UI: Fixed the crash on iPad for the apps that support only landscape orientation
Fixed
- UI: User sees liveness intro screen after app is backgrounded during liveness capture
- UI: Device permission screen labels overlapping with icon when user setting has larger text size
- UI: Fix for having wrong sized record button on liveness capture screen in some dynamic font size configured cases
- UI: Fixed crash when tapping two buttons on capture confirmation screen at the same time
- Removed unnecessary string keys
-
SDK does not throw
OnfidoFlowError.microphonePermission
when face capture photo variant is used and app has microphone permission denied
Added
- UI: Showing bubble for wrong head turn detection on liveness screen
- UI: Added dynamic font size support for flow intro and selfie intro screens
- UI: Added dynamic font size support for liveness capture screen
- UI: Added dynamic font size support for bubble views that appears in photo capture, liveness head turn detection and capture confirmation screens
- UI: Added dynamic font size support for liveness intro screen
- UI: Added dynamic font size support for photo capture confirmation screen
- UI: Added dynamic font size support for buttons
- UI: Added dynamic font size support for document photo capture screen
- UI: Added french localisation
- Allowing custom localisation from non-localised strings file
Added
- UI: Added optional welcome intro screen
- UI: Added selfie (face capture photo variant) intro screen
- UI: Added dynamic font size support for document type selection screen
- UI: Added dynamic font size support for country selection screen
- UI: Added latency for face detection on liveness capture (face capture video variant) to allow readability of instructions
Fixed
- UI: Fixed text cut-off issue on liveness instructions screens when user language is Spanish
- UI: Fixed Onfido logo and video playback view overlapping issue in liveness intro screen
- Fixed cut-off issue on document images captured on certain iPads
- Fix for the intermittent video cut-off issue when liveness capture recorded on certain iPads
- Removed unused assets
Fixed
- UI: Fix sdk crash on capture during the backside capture of two sided document on Cordova
- UI: Fix for the Segment SDK name clash
- UI: Fix infinite spinning wheel not removed when liveness upload failed.
- UI: Fixed custom localisation of text in liveness confirmation screen now going over multiple lines when text too long (max three)
[7.2.0] - 2018-07-17
Note : This version might be a breaking change if you are providing customised language translations. Please see MIGRATION.md .
[7.1.0] - 2018-06-07
Note : This version might be a breaking change if you are providing customised language translations. Please see MIGRATION.md .
[7.0.0] - 2018-04-17
Note : This version might be a breaking change if you are providing customised language translations. Please see MIGRATION.md .
Fixed
- upload results objects now exposing to objective-c integrator
- UI: Fixed possible crash on camera capture
- UI: Fixed crash on rotation during live video recording
- UI: Fixed crash on going back from preselected document capture screen while glare detected
- UI: Fixed back button with English text on non-English language text flow
[6.0.0] - 2018-04-04
Note:
- This version is not backwards-compatible. Migration notes can be found in MIGRATION.md
Fixed
- UI: Fixed large back button issue on iPhone X
- UI: Fixed face capture oval height ratio on iPhone X
- Internal: Fixed issue with not cleaning up uploaded images and videos from device
- Internal: Fixed issue with different video codecs being used for video capture
- Internal: Fixed document photo resolution in order to reduce data usage
[5.0.0] - 2017-11-06
Note:
- This version is not backwards-compatible. Migration notes can be found in MIGRATION.md
[4.0.0] - 2017-10-09
Note:
- This version is not backwards-compatible. Migration notes can be found in MIGRATION.md
[3.0.0] - 2017-09-15
Note:
- This version is not backwards-compatible. Migration notes can be found in MIGRATION.md
- This version supports Swift 3.2 and Swift 4 but we have not tested it fully against iOS 11 yet, therefore we cannot guarantee that all features will work properly on that operating system
Added
- Option to bring the capture UI without actually creating anything on the Onfido servers
- The applicant details are now passed as a Hash if the client wants the library to create it
- The SDK will return the LivePhoto or Document (including the captured files) when calling the callback closure of the host app - making it possible to use the capture UI without creating the files on the Onfido server, grabbing them and uploading later on
- OnfidoSDKResults class which will encapsulate the return values (Applicant, LivePhoto, Document or Check) to the host app's callback closure
- A "validate" parameter has been added to the OnfidoAPI.uploadDocument() method (refer to the Readme file)
Onfido SDK Migration Guides
These guides below are provided to ease the transition of existing applications using the Onfido SDK from one version to another that introduces breaking API changes.
- Onfido iOS SDK 30.0.0 Migration Guide
- Onfido iOS SDK 29.9.0 Migration Guide
- Onfido iOS SDK 29.6.0 Migration Guide
- Onfido iOS SDK 29.5.0 Migration Guide
- Onfido iOS SDK 29.3.0 Migration Guide
- Onfido iOS SDK 29.2.0 Migration Guide
- Onfido iOS SDK 29.1.0 Migration Guide
- Onfido iOS SDK 29.0.0 Migration Guide
- Onfido iOS SDK 28.1.0 Migration Guide
- Onfido iOS SDK 28.0.0 Migration Guide
- Onfido iOS SDK 27.2.0 Migration Guide
- Onfido iOS SDK 27.0.0 Migration Guide
- Onfido iOS SDK 25.0.0 Migration Guide
- Onfido iOS SDK 24.2.0 Migration Guide
- Onfido iOS SDK 24.0.0 Migration Guide
- Onfido iOS SDK 23.1.0 Migration Guide
- Onfido iOS SDK 23.0.0 Migration Guide
- Onfido iOS SDK 22.2.0 Migration Guide
- Onfido iOS SDK 22.1.0 Migration Guide
- Onfido iOS SDK 22.0.0 Migration Guide
- Onfido iOS SDK 21.4.0 Migration Guide
- Onfido iOS SDK 21.2.0 Migration Guide
- Onfido iOS SDK 21.0.0 Migration Guide
- Onfido iOS SDK 19.0.0 Migration Guide
- Onfido iOS SDK 18.10.0 Migration Guide
- Onfido iOS SDK 18.9.0 Migration Guide
- Onfido iOS SDK 18.8.0 Migration Guide
- Onfido iOS SDK 18.7.0 Migration Guide
- Onfido iOS SDK 18.5.0 Migration Guide
- Onfido iOS SDK 18.1.0 Migration Guide
- Onfido iOS SDK 18.0.0 Migration Guide
- Onfido iOS SDK 17.0.0 Migration Guide
- Onfido iOS SDK 16.1.0 Migration Guide
- Onfido iOS SDK 16.0.0 Migration Guide
- Onfido iOS SDK 15.0.0 Migration Guide
- Onfido iOS SDK 14.0.0-rc Migration Guide
- Onfido iOS SDK 14.0.0-beta Migration Guide
- Onfido iOS SDK 13.2.0 Migration Guide
- Onfido iOS SDK 13.1.0 Migration Guide
- Onfido iOS SDK 13.0.0 Migration Guide
- Onfido iOS SDK 12.1.0 Migration Guide
- Onfido iOS SDK 12.0.0 Migration Guide
- Onfido iOS SDK 11.1.2 Migration Guide
- Onfido iOS SDK 11.1.0 Migration Guide
- Onfido iOS SDK 11.0.0 Migration Guide
- Onfido iOS SDK 10.6.0 Migration Guide
- Onfido iOS SDK 10.5.0 Migration Guide
- Onfido iOS SDK 10.4.0 Migration Guide
- Onfido iOS SDK 10.3.0 Migration Guide
- Onfido iOS SDK 10.2.0 Migration Guide
- Onfido iOS SDK 10.1.0 Migration Guide
- Onfido iOS SDK 10.0.0 Migration Guide
- Onfido iOS SDK 9.0.0 Migration Guide
- Onfido iOS SDK 8.0.0 Migration Guide
- Onfido iOS SDK 7.2.0 Migration Guide
- Onfido iOS SDK 7.1.0 Migration Guide
- Onfido iOS SDK 7.0.0 Migration Guide
- Onfido iOS SDK 6.0.0 Migration Guide
- Onfido iOS SDK 5.6.0 Migration Guide
- Onfido iOS SDK 5.5.0 Migration Guide
- Onfido iOS SDK 5.1.0 Migration Guide
- Onfido iOS SDK 5.0.0 Migration Guide
- Onfido iOS SDK 4.0.0 Migration Guide
- Onfido iOS SDK 3.0.0 Migration Guide
Breaking API Changes
-
If you currently set
recordAudio
, useMotionStepConfiguration(recordAudio:)
instead. If not, usenil
instead ofMotionStepConfiguration(captureFallback:)
. -
If you are using Objective-C, please, follow Xcode hints to fix Objective-C types of the Onfido SDK, from now they have an
ON
prefix to prevent potential namespacing collisions.
Removed
Due to a change introduced by Apple in March 2023 with iOS v16.0, PACE-only documents can no longer be read by iOS devices installed with iOS 16 (or newer). To minimise integration complexity and instability with future releases of iOS, Onfido is removing support for NFC-PACE.
PACE is an optional authentication protocol used by some identity documents during NFC processing. All passports support BAC which is still supported by both iOS and the Onfido iOS SDK.
Impact:
- None: all currently supported NFC documents can still be read by the Onfido iOS SDK, including the documents that support both BAC and PACE as authentication methods (e.g. French passport, Dutch national ID card, Polish ID card).
- CAN-entry: As CAN (Card Authentication Number) is only required for PACE Authentication, for documents require the user to enter the CAN, those screens will no longer be shown but the NFC read will proceed with BAC (which is based on the extracted MRZ).
Added
The following string keys have been added :
-
onfido_nfc_scan_error_final_possible_passport_title
() -
onfido_nfc_scan_error_final_possible_passport_list_item_1
() -
onfido_nfc_scan_error_final_possible_passport_list_item_2
() -
onfido_nfc_scan_error_final_possible_passport_list_item_3
() -
onfido_nfc_scan_error_final_possible_passport_list_item_4
() -
onfido_nfc_scan_error_final_possible_passport_primary_button
() -
onfido_nfc_scan_error_final_possible_passport_secondary_button
() -
onfido_nfc_scan_error_final_required_passport_title
() -
onfido_nfc_scan_error_final_required_passport_list_item_1
() -
onfido_nfc_scan_error_final_required_passport_list_item_2
() -
onfido_nfc_scan_error_final_required_passport_list_item_3
() -
onfido_nfc_scan_error_final_required_passport_list_item_4
() -
onfido_nfc_scan_error_final_required_passport_primary_button
() -
onfido_nfc_scan_error_final_required_passport_secondary_button
() -
onfido_nfc_scan_error_document_title
() -
onfido_nfc_scan_error_document_subtitle
() -
onfido_nfc_scan_error_document_primary_button
() -
onfido_nfc_scan_doc_selection_disclaimer
() -
onfido_nfc_scan_error_final_possible_card_title
() -
onfido_nfc_scan_error_final_possible_card_list_item_1
() -
onfido_nfc_scan_error_final_possible_card_list_item_2
() -
onfido_nfc_scan_error_final_possible_card_list_item_3
() -
onfido_nfc_scan_error_final_possible_card_list_item_4
() -
onfido_nfc_scan_error_final_possible_card_primary_button
() -
onfido_nfc_scan_error_final_possible_card_secondary_button
() -
onfido_nfc_scan_error_final_required_card_title
() -
onfido_nfc_scan_error_final_required_card_list_item_1
() -
onfido_nfc_scan_error_final_required_card_list_item_2
() -
onfido_nfc_scan_error_final_required_card_list_item_3
() -
onfido_nfc_scan_error_final_required_card_list_item_4
() -
onfido_nfc_scan_error_final_required_card_primary_button
() -
onfido_nfc_scan_error_final_required_card_secondary_button
() -
onfido_nfc_scan_welcome_card_disclaimer
() -
onfido_enter_can_secondary_button
() -
onfido_enter_can_warning
() -
onfido_nfc_scan_error_can_title
() -
onfido_nfc_scan_error_can_subtitle
() -
onfido_nfc_scan_error_can_primary_button
()
Changed
The following string keys have been changed :
-
onfido_nfc_intro_title_passport
() -
onfido_nfc_intro_subtitle_passport
() -
onfido_nfc_intro_passport_scan_guide_1
() -
onfido_nfc_intro_passport_scan_guide_2
() -
onfido_nfc_intro_passport_scan_guide_3
() -
onfido_nfc_intro_passport_scan_guide_4
() -
onfido_enter_can_title
() -
onfido_enter_can_subtitle
() -
onfido_nfc_scan_sheet_success
()
Added
The following string keys have been added :
-
onfido_doc_confirmation_alert_odp_screenshot_title
(ar, hy, bg, zh-Hans, zh-Hant, hr, cs, da, nl, en-GB, en, et, fi, fr-CA, fr, de, el, he, hi, hu, id, it, ja, ko, lv, lt, ms, no, fa, pl, pt-BR, pt, ro, ru, sr-Latn, sk, sl, es-419, es, sv, th, tr, uk, v) -
onfido_doc_confirmation_alert_odp_photo_of_screen_title
(ar, hy, bg, zh-Hans, zh-Hant, hr, cs, da, nl, en-GB, en, et, fi, fr-CA, fr, de, el, he, hi, hu, id, it, ja, ko, lv, lt, ms, no, fa, pl, pt-BR, pt, ro, ru, sr-Latn, sk, sl, es-419, es, sv, th, tr, uk, v) -
nfido_doc_confirmation_alert_odp_photocopy_title
(ar, hy, bg, zh-Hans, zh-Hant, hr, cs, da, nl, en-GB, en, et, fi, fr-CA, fr, de, el, he, hi, hu, id, it, ja, ko, lv, lt, ms, no, fa, pl, pt-BR, pt, ro, ru, sr-Latn, sk, sl, es-419, es, sv, th, tr, uk, v) -
onfido_doc_confirmation_alert_odp_scan_title
(ar, hy, bg, zh-Hans, zh-Hant, hr, cs, da, nl, en-GB, en, et, fi, fr-CA, fr, de, el, he, hi, hu, id, it, ja, ko, lv, lt, ms, no, fa, pl, pt-BR, pt, ro, ru, sr-Latn, sk, sl, es-419, es, sv, th, tr, uk, v) -
onfido_doc_confirmation_alert_odp_detail
(ar, hy, bg, zh-Hans, zh-Hant, hr, cs, da, nl, en-GB, en, et, fi, fr-CA, fr, de, el, he, hi, hu, id, it, ja, ko, lv, lt, ms, no, fa, pl, pt-BR, pt, ro, ru, sr-Latn, sk, sl, es-419, es, sv, th, tr, uk, v)
Changed
The following string keys have been changed :
-
onfido_nfc_intro_sheet_header_ready_passport
(ar, hy, bg, zh-Hans, zh-Hant, hr, cs, da, nl, en-GB, en, et, fi, fr-CA, fr, de, el, he, hi, hu, id, it, ja, ko, lv, lt, ms, no, fa, pl, pt-BR, pt, ro, ru, sr-Latn, sk, sl, es-419, es, sv, th, tr, uk, v) -
onfido_nfc_intro_sheet_header_scanning_passport
(ar, hy, bg, zh-Hans, zh-Hant, hr, cs, da, nl, en-GB, en, et, fi, fr-CA, fr, de, el, he, hi, hu, id, it, ja, ko, lv, lt, ms, no, fa, pl, pt-BR, pt, ro, ru, sr-Latn, sk, sl, es-419, es, sv, th, tr, uk, v) -
onfido_nfc_intro_sheet_header_scanning_card
(ar, hy, bg, zh-Hans, zh-Hant, hr, cs, da, nl, en-GB, en, et, fi, fr-CA, fr, de, el, he, hi, hu, id, it, ja, ko, lv, lt, ms, no, fa, pl, pt-BR, pt, ro, ru, sr-Latn, sk, sl, es-419, es, sv, th, tr, uk, v)
Added
The following string keys have been added :
-
onfido_doc_capture_alert_too_close_title
(no) -
onfido_doc_capture_alert_rotated_title
(no) -
onfido_doc_capture_alert_too_far_title
(no) -
onfido_doc_capture_alert_wrong_side_front_title
(no) -
onfido_doc_capture_alert_wrong_side_back_title
(no) -
onfido_doc_capture_alert_hold_still_title
(no)
-
onfido_doc_capture_header_recording_video
(en, fr, de, es, it, pt, nl) -
onfido_doc_capture_header_recording_complete
(en, fr, de, es, it, pt, nl)
-
onfido_doc_capture_alert_photo_page_title
(en, fr, de, es, it, pt, nl) -
onfido_doc_capture_alert_tilted_title
(en, fr, de, es, it, pt, nl)
Added
The following string keys have been added :
-
onfido_doc_capture_alert_too_close_title
(no) -
onfido_doc_capture_alert_rotated_title
(no) -
onfido_doc_capture_alert_too_far_title
(no) -
onfido_doc_capture_alert_wrong_side_front_title
(no) -
onfido_doc_capture_alert_wrong_side_back_title
(no) -
onfido_doc_capture_alert_hold_still_title
(no)
-
onfido_doc_capture_alert_photo_page_title
(en, fr, de, es, it, pt, nl) -
onfido_doc_capture_alert_tilted_title
(en, fr, de, es, it, pt, nl)
Added
The following string keys have been added :
-
onfido_doc_capture_alert_too_close_title
(en, fr, de, es, it, pt, nl) -
onfido_doc_capture_alert_rotated_title
(en, fr, de, es, it, pt, nl) -
onfido_doc_capture_alert_too_far_title
(en, fr, de, es, it, pt, nl) -
onfido_doc_capture_alert_wrong_side_front_title
(en, fr, de, es, it, pt, nl) -
onfido_doc_capture_alert_wrong_side_back_title
(en, fr, de, es, it, pt, nl) -
onfido_doc_capture_alert_hold_still_title
(en, fr, de, es, it, pt, nl)
-
onfido_nfc_scan_welcome_card_title
() -
onfido_nfc_scan_welcome_card_subtitle
() -
onfido_nfc_scan_welcome_card_list_item
() -
onfido_nfc_scan_welcome_card_list_item_2
() -
onfido_nfc_scan_welcome_card_list_item_3
() -
onfido_nfc_scan_welcome_card_button_primary
() -
onfido_nfc_scan_welcome_card_secondary_button
() -
onfido_nfc_scan_error_inter_title
() -
onfido_nfc_scan_error_inter_list_item
() -
onfido_nfc_scan_error_inter_list_item_2
() -
onfido_nfc_scan_error_inter_primary_button
() -
onfido_nfc_scan_error_inter_secondary_button
() -
onfido_nfc_scan_error_final_title
() -
onfido_nfc_scan_error_final_subtitle
() -
onfido_nfc_scan_error_final_list_item
() -
onfido_nfc_scan_error_final_primary_button
() -
onfido_nfc_scan_error_final_secondary_button
() -
onfido_nfc_scan_welcome_passport_title
() -
onfido_nfc_scan_welcome_passport_subtitle
() -
onfido_nfc_scan_welcome_passport_list_item
() -
onfido_nfc_scan_welcome_passport_list_item_2
() -
onfido_nfc_scan_welcome_passport_list_item_3
() -
onfido_nfc_scan_welcome_passport_list_item_4
() -
onfido_nfc_scan_welcome_passport_list_item_5
() -
onfido_nfc_scan_welcome_passport_button_primary
() -
onfido_nfc_scan_welcome_passport_secondary_button
() -
onfido_nfc_scan_error_inter_passport_title
() -
onfido_nfc_scan_error_inter_passport_list_item
() -
onfido_nfc_scan_error_inter_passport_list_item_2
() -
onfido_nfc_scan_error_inter_passport_primary_button
() -
onfido_nfc_scan_error_inter_passport_secondary_button
()
Removed
The following string keys have been removed :
-
onfido_app_title_doc_video_confirmation
-
onfido_doc_video_capture_alert_wrong_side
-
onfido_doc_video_capture_button_primary_fallback
-
onfido_doc_video_capture_button_primary_fallback_end
-
onfido_doc_video_capture_button_primary_start
-
onfido_doc_video_capture_detail_step2
-
onfido_doc_video_capture_header
-
onfido_doc_video_capture_header_paper_doc_step2
-
onfido_doc_video_capture_header_passport
-
onfido_doc_video_capture_header_passport_progress
-
onfido_doc_video_capture_header_step1
-
onfido_doc_video_capture_header_step2
-
onfido_doc_video_capture_prompt_button_timeout
-
onfido_doc_video_capture_prompt_detail_timeout
-
onfido_doc_video_capture_prompt_header_timeout
-
onfido_doc_video_capture_stepper
-
onfido_doc_video_capture_success_accessibility
-
onfido_doc_video_confirmation_body
-
onfido_doc_video_confirmation_button_primary
-
onfido_doc_video_confirmation_button_secondary
-
onfido_doc_video_confirmation_button_secondary_preview
-
onfido_doc_video_confirmation_button_secondary_retake
-
onfido_doc_video_confirmation_title
-
onfido_outro_title
-
onfido_welcome_list_header_doc_video
-
onfido_welcome_list_item_doc_video
-
onfido_welcome_list_item_doc_video_flash
-
onfido_welcome_list_item_doc_video_timeout
Breaking API changes
- The way to configure SDK for document capture step has changed. To see instructions and usage examples please check out README page.
Added
The following string keys have been added :
-
onfido_welcome_start_workflow_button_trial
-
onfido_enter_can_title
-
onfido_enter_can_subtitle
-
onfido_enter_can_disclaimer
-
onfido_enter_can_button_primary
-
onfido_nfc_scan_error_title
-
onfido_nfc_scan_error_list_item
-
onfido_nfc_scan_error_list_item_2
-
onfido_nfc_scan_error_button_primary
-
onfido_welcome_nfc_title
-
onfido_welcome_nfc_subtitle
-
onfido_welcome_nfc_list_header_nfc
-
onfido_welcome_nfc_list_item
-
onfido_welcome_nfc_list_item_2
-
onfido_welcome_nfc_button_primary
-
onfido_intro_scan_title
-
onfido_intro_scan_subtitle
-
onfido_intro_scan_list_item
-
onfido_intro_scan_list_item_3
-
onfido_intro_scan_button_primary
-
onfido_nfc_scan_sheet
-
onfido_nfc_scan_scanning_sheet_1
-
onfido_nfc_scan_can-required_sheet_2
-
onfido_nfc_scan_lost-contact_sheet_3
-
onfido_nfc_scan_lost-connection_sheet_4
-
onfido_nfc_scan_incorrect-can_sheet_5
-
onfido_enter_can_error_label
-
onfido_enter_can_substring_attempt_singular
-
onfido_enter_can_substring_attempt_plural
-
onfido_nfc_scan_error_button_secondary
-
onfido_intro_scan_animation_ios
Changed
The following string keys have been changed :
-
onfido_poa_intro_list_shows_address_ios
-
onfido_poa_intro_list_matches_signup_ios
-
onfido_poa_intro_list_most_recent_ios
-
onfido_poa_intro_title_ios
-
onfido_poa_guidance_subtitle_bill_ios
-
onfido_poa_guidance_subtitle_bank_statement_ios
-
onfido_poa_guidance_subtitle_tax_letter_ios
-
onfido_poa_guidance_subtitle_benefits_letter_ios
Added
The following string keys have been added :
-
onfido_nfc_intro_carousel_body_remove_cover
(en, fr, de, es, it, nl, pt) -
nonfido_nfc_intro_carousel_body_lay_flat
(en, fr, de, es, it, nl, pt) -
nonfido_nfc_intro_carousel_body_phone_middle
(en, fr, de, es, it, nl, pt) -
nonfido_nfc_intro_carousel_body_last_page
(en, fr, de, es, it, nl, pt) -
nonfido_nfc_intro_carousel_body_dont_move
(en, fr, de, es, it, nl, pt)
-
onfido_doc_capture_header_capturing
(en, fr, de, es, it, pt, nl)
Breaking API Changes
- Removed withToken( :) and withApplicantId( :) functions from OnfidoConfigBuilder. Mobile tokens are no longer supported.
- Removed cases missingApplicant, multipleTokenTypes, applicantProvidedWithSDKToken and enterpriseFeatureProvidedWithMobileToken from OnfidoConfigError. Mobile tokens are no longer supported.
- Renamed OnfidoConfigError.missingToken to OnfidoConfigError.missingSDKToken.
- Added new OnfidoConfigError case named invalidSDKToken when invalid SDK token supplied.
- Removed initialisers with parameters for Appearance (ONAppearance) and CaptureSuccessColors (ONCaptureSuccessColors), and made properties public. i.e. let appearance = Appearance(); appearance.primaryColor = UIColor.red;
- Renamed withPassportNFCReadBetaFeatureEnabled sdk configuration function to withNFCReadBetaFeatureEnabled.
- Removed EnterpriseFeature convenience initialiser. Use EnterpriseFeatures.builder().withHideOnfidoLogo(_:).build() instead.
Added
The following string keys have been added :
-
onfido_video_capture_prompt_header_restart
(en, fr, de, es, it, pt) -
onfido_video_capture_prompt_detail_restart
(en, fr, de, es, it, pt) -
onfido_video_capture_prompt_button_restart
(en, fr, de, es, it, pt)
-
onfido_doc_capture_header_scanning
(en, fr, de, es, it, pt) -
onfido_welcome_list_header
(en, fr, de, es, it, pt) -
onfido_welcome_list_item_doc_photo
(en, fr, de, es, it, pt) -
onfido_welcome_list_item_doc_video
(en, fr, de, es, it, pt) -
onfido_welcome_list_item_doc_generic
(en, fr, de, es, it, pt) -
onfido_welcome_list_item_face_photo
(en, fr, de, es, it, pt) -
onfido_welcome_list_item_face_video
(en, fr, de, es, it, pt) -
onfido_welcome_list_item_face_generic
(en, fr, de, es, it, pt)
-
onfido_doc_capture_header_live_guidance_intro_accessibility
(en, fr, de, es, it, pt) -
onfido_doc_capture_header_live_guidance_no_doc
(en, fr, de, es, it, pt) -
onfido_doc_capture_header_live_guidance_no_doc_accessibility
(en, fr, de, es, it, pt) -
onfido_doc_capture_header_live_guidance_distance_close
(en, fr, de, es, it, pt) -
onfido_doc_capture_header_live_guidance_distance_close_accessibility
(en, fr, de, es, it, pt) -
onfido_doc_capture_header_live_guidance_distance_far
(en, fr, de, es, it, pt) -
onfido_doc_capture_header_live_guidance_distance_far_accessibility
(en, fr, de, es, it, pt) -
onfido_doc_capture_header_live_guidance_distance_ok
(en, fr, de, es, it, pt) -
onfido_doc_capture_header_live_guidance_distance_ok_accessibility
(en, fr, de, es, it, pt) -
onfido_doc_capture_header_live_guidance_doc_too_left
(en, fr, de, es, it, pt) -
onfido_doc_capture_header_live_guidance_doc_too_left_accessibility
(en, fr, de, es, it, pt) -
onfido_doc_capture_header_live_guidance_doc_too_right
(en, fr, de, es, it, pt) -
onfido_doc_capture_header_live_guidance_doc_too_right_accessibility
(en, fr, de, es, it, pt) -
onfido_doc_capture_header_live_guidance_doc_too_high
(en, fr, de, es, it, pt) -
onfido_doc_capture_header_live_guidance_doc_too_high_accessibility
(en, fr, de, es, it, pt) -
onfido_doc_capture_header_live_guidance_doc_slightly_high
(en, fr, de, es, it, pt) -
onfido_doc_capture_header_live_guidance_doc_slightly_high_accessibility
(en, fr, de, es, it, pt) -
onfido_doc_capture_header_live_guidance_doc_too_low
(en, fr, de, es, it, pt) -
onfido_doc_capture_header_live_guidance_doc_too_low_accessibility
(en, fr, de, es, it, pt) -
onfido_doc_capture_header_live_guidance_doc_slightly_low
(en, fr, de, es, it, pt) -
onfido_doc_capture_header_live_guidance_doc_slightly_low_accessibility
(en, fr, de, es, it, pt) -
onfido_doc_capture_header_live_guidance_doc_position_ok
(en, fr, de, es, it, pt) -
onfido_doc_capture_header_live_guidance_doc_position_ok_accessibility
(en, fr, de, es, it, pt) -
onfido_doc_capture_header_live_guidance_intro
(en, fr, de, es, it, pt)
Changed
The following string keys have been changed :
-
onfido_doc_capture_frame_accessibility_pp_auto
(en, fr, de, es, it, pt) -
onfido_doc_capture_frame_accessibility_pp_manual
(en, fr, de, es, it, pt) -
onfido_doc_capture_frame_accessibility_dl_front_manual
(en, fr, de, es, it, pt) -
onfido_doc_capture_frame_accessibility_dl_back_manual
(en, fr, de, es, it, pt) -
onfido_doc_capture_frame_accessibility_dl_front_auto
(en, fr, de, es, it, pt) -
onfido_doc_capture_frame_accessibility_dl_back_auto
(en, fr, de, es, it, pt) -
onfido_doc_capture_frame_accessibility_ic_front_manual
(en, fr, de, es, it, pt) -
onfido_doc_capture_frame_accessibility_ic_back_manual
(en, fr, de, es, it, pt) -
onfido_doc_capture_frame_accessibility_rp_front_manual
(en, fr, de, es, it, pt) -
onfido_doc_capture_frame_accessibility_rp_back_manual
(en, fr, de, es, it, pt) -
onfido_doc_capture_frame_accessibility_dl_fr_front_manual
(en, fr, de, es, it, pt) -
onfido_doc_capture_frame_accessibility_dl_fr_back_manual
(en, fr, de, es, it, pt) -
onfido_doc_capture_frame_accessibility_ic_it_front_manual
(en, fr, de, es, it, pt) -
onfido_doc_capture_frame_accessibility_ic_it_back_manual
(en, fr, de, es, it, pt) -
onfido_doc_capture_frame_accessibility_ic_za_front_manual
(en, fr, de, es, it, pt) -
onfido_doc_capture_frame_accessibility_ic_za_back_manual
(en, fr, de, es, it, pt) -
onfido_doc_capture_frame_accessibility_pp_cover_manual
(en, fr, de, es, it, pt) -
onfido_doc_capture_header_folded_doc_back
(en, fr, de, es, it, pt) -
onfido_doc_capture_header_passport
(en, fr, de, es, it, pt) -
onfido_doc_capture_header_visa
(en, fr, de, es, it, pt) -
onfido_doc_capture_header_passport_auto
(en, fr, de, es, it, pt) -
onfido_doc_capture_header_license_back
(en, fr, de, es, it, pt) -
onfido_doc_capture_header_license_back_auto
(en, fr, de, es, it, pt) -
onfido_doc_capture_header_generic_back
(en, fr, de, es, it, pt) -
onfido_doc_capture_header_id_back
(en, fr, de, es, it, pt) -
onfido_doc_capture_header_permit_back
(en, fr, de, es, it, pt) -
onfido_doc_capture_header_license_front
(en, fr, de, es, it, pt) -
onfido_doc_capture_header_license_front_auto
(en, fr, de, es, it, pt) -
onfido_doc_capture_header_generic_front
(en, fr, de, es, it, pt) -
onfido_doc_capture_header_id_front
(en, fr, de, es, it, pt) -
onfido_doc_capture_header_permit_front
(en, fr, de, es, it, pt)
Removed
The following string keys have been removed :
-
onfido_welcome_list_header_doc_video
(en, fr, de, es, it, pt) -
onfido_welcome_list_item_doc
(en, fr, de, es, it, pt) -
onfido_welcome_list_header_photo
(en, fr, de, es, it, pt) -
onfido_welcome_list_header_record
(en, fr, de, es, it, pt)
-
onfido_doc_capture_frame_accessibility_pp_auto
(en, fr, de, es, it, pt) -
onfido_doc_capture_frame_accessibility_pp_manual
(en, fr, de, es, it, pt) -
onfido_doc_capture_frame_accessibility_dl_fr_front_manual
(en, fr, de, es, it, pt) -
onfido_doc_capture_frame_accessibility_dl_front_auto
(en, fr, de, es, it, pt) -
onfido_doc_capture_frame_accessibility_dl_front_manual
(en, fr, de, es, it, pt) -
onfido_doc_capture_frame_accessibility_dl_back_manual
(en, fr, de, es, it, pt) -
onfido_doc_capture_frame_accessibility_ic_front_manual
(en, fr, de, es, it, pt) -
onfido_doc_capture_frame_accessibility_ic_back_manual
(en, fr, de, es, it, pt) -
onfido_doc_capture_frame_accessibility_rp_front_manual
(en, fr, de, es, it, pt) -
onfido_doc_capture_frame_accessibility_rp_back_manual
(en, fr, de, es, it, pt) -
onfido_doc_capture_frame_accessibility_dl_fr_back_manual
(en, fr, de, es, it, pt) -
onfido_doc_capture_frame_accessibility_ic_it_front_manual
(en, fr, de, es, it, pt) -
onfido_doc_capture_frame_accessibility_ic_it_back_manual
(en, fr, de, es, it, pt) -
onfido_doc_capture_frame_accessibility_ic_za_front_manual
(en, fr, de, es, it, pt) -
onfido_doc_capture_frame_accessibility_ic_za_back_manual
(en, fr, de, es, it, pt) -
onfido_doc_capture_frame_accessibility_pp_cover_manual
(en, fr, de, es, it, pt) -
onfido_doc_capture_frame_accessibility_dl_back_auto
(en, fr, de, es, it, pt)
-
onfido_confirm_passport
(en) -
onfido_confirm_residence_permit
(en) -
onfido_confirm_visa
(en)
-
onfido_nfc_intro:title_passport
(en, fr, de, es, it, pt) -
onfido_nfc_intro:title_card
(en, fr, de, es, it, pt)
Added
The following string keys have been added :
-
onfido_doc_capture_frame_success_accessibility
(en, fr, es, de, it, pt)
-
onfido_doc_capture_alert_no_mrz3_title
(en, fr, de, es, it, pt)
-
onfido_nfc_select_title_passport
(en, fr, de, es, it, pt) -
onfido_nfc_select_subtitle_passport
(en, fr, de, es, it, pt) -
onfido_nfc_select_body_passport
(en, fr, de, es, it, pt) -
onfido_nfc_select_button_primary_passport
(en, fr, de, es, it, pt) -
onfido_nfc_select_button_secondary_passport
(en, fr, de, es, it, pt) -
onfido_nfc_intro_title_passport
(en, fr, de, es, it, pt) -
onfido_nfc_intro_subtitle_passport
(en, fr, de, es, it, pt) -
onfido_nfc_intro_button_primary_passport
(en, fr, de, es, it, pt) -
onfido_nfc_intro_sheet_header_ready_passport
(en, fr, de, es, it, pt) -
onfido_nfc_intro_sheet_header_scanning_passport
(en, fr, de, es, it, pt) -
onfido_nfc_intro_title_card
(en, fr, de, es, it, pt) -
onfido_nfc_intro_subtitle_card
(en, fr, de, es, it, pt) -
onfido_nfc_intro_button_primary_card
(en, fr, de, es, it, pt) -
onfido_nfc_intro_sheet_header_ready_card
(en, fr, de, es, it, pt) -
onfido_nfc_intro_sheet_header_scanning_card
(en, fr, de, es, it, pt) -
onfido_nfc_intro_sheet_header_fail_passport
(en, fr, de, es, it, pt) -
onfido_nfc_intro_sheet_header_fail_card
(en, fr, de, es, it, pt) -
onfido_nfc_fail_title_passport
(en, fr, de, es, it, pt) -
onfido_nfc_fail_list_item_remove_covers_passport
(en, fr, de, es, it, pt) -
onfido_nfc_fail_list_item_remove_covers_passport
(en, fr, de, es, it, pt) -
onfido_nfc_fail_button_primary_passport
(en, fr, de, es, it, pt) -
onfido_nfc_fail_button_secondary_passport
(en, fr, de, es, it, pt) -
onfido_nfc_fail_title_card
(en, fr, de, es, it, pt) -
onfido_nfc_fail_list_item_remove_covers_card
(en, fr, de, es, it, pt) -
onfido_nfc_fail_list_item_keep_contact_card
(en, fr, de, es, it, pt) -
onfido_nfc_fail_button_primary_card
(en, fr, de, es, it, pt) -
onfido_nfc_fail_button_secondary_card
(en, fr, de, es, it, pt)
-
onfido_video_capture_turn_success_accessibility
(en, fr, es, de, it, pt)
Changed
The following string keys have been changed :
-
onfido_doc_capture_frame_accessibility_pp_auto
(en, fr, es, de, it, pt) -
onfido_doc_capture_frame_accessibility_dl_front_auto
(en, fr, es, de, it, pt) -
onfido_doc_capture_frame_accessibility_dl_back_auto
(en, fr, es, de, it, pt)
-
onfido_video_capture_frame_success_accessibility
(en, fr, es, de, it, pt)
Removed
The following string keys have been removed :
-
onfido_nfc_select_title
(en, fr, de, es, it, pt) -
onfido_nfc_select_subtitle
(en, fr, de, es, it, pt) -
onfido_nfc_select_body
(en, fr, de, es, it, pt) -
onfido_nfc_select_button_primary
(en, fr, de, es, it, pt) -
onfido_nfc_select_button_secondary
(en, fr, de, es, it, pt) -
onfido_nfc_intro_title
(en, fr, de, es, it, pt) -
onfido_nfc_intro_subtitle
(en, fr, de, es, it, pt) -
onfido_nfc_intro_button_primary
(en, fr, de, es, it, pt) -
onfido_nfc_intro_sheet_header_ready
(en, fr, de, es, it, pt) -
onfido_nfc_intro_sheet_header_scanning
(en, fr, de, es, it, pt) -
onfido_nfc_fail_title
(en, fr, de, es, it, pt) -
onfido_nfc_fail_list_item_remove_covers
(en, fr, de, es, it, pt) -
onfido_nfc_fail_list_item_keep_contact
(en, fr, de, es, it, pt) -
onfido_nfc_fail_button_primary
(en, fr, de, es, it, pt) -
onfido_nfc_fail_button_secondary
(en, fr, de, es, it, pt)
Changed
The following string keys have been changed :
-
onfido_doc_confirmation_alert_blur_detail
(en, fr, es, de) -
onfido_video_intro_list_item_move_speak
(en, fr, es, de) -
onfido_video_capture_prompt_detail_timeout
(en, fr, es, de) -
onfido_doc_confirmation_body_visa
(en, fr, es, de) -
onfido_doc_capture_detail_license_back
(en, fr, es, de) -
onfido_doc_capture_detail_generic_back
(en, fr, es, de) -
onfido_doc_capture_detail_id_back
(en, fr, es, de) -
onfido_doc_capture_detail_permit_back
(en, fr, es, de) -
onfido_doc_capture_detail_license_front
(en, fr, es, de) -
onfido_doc_capture_detail_generic_front
(en, fr, es, de) -
onfido_doc_capture_detail_id_front
(en, fr, es, de) -
onfido_doc_capture_detail_permit_front
(en, fr, es, de) -
onfido_doc_capture_header_license_back
(en, fr, es, de) -
onfido_doc_capture_header_license_back_auto
(en, fr, es, de) -
onfido_doc_capture_header_generic_back
(en, fr, es, de) -
onfido_doc_capture_header_license_front
(en, fr, es, de) -
onfido_doc_capture_header_license_front_auto
(en, fr, es, de) -
onfido_doc_capture_header_generic_front
(en, fr, es, de) -
onfido_selfie_confirmation_alert_no_face_detail
(en, fr, es, de) -
onfido_doc_capture_detail_visa
(en, fr, es, de) -
onfido_video_capture_button_primary_fallback
(en, fr, es, de) -
onfido_country_select_bottom_sheet_link_doc_select
(en, fr, es, de) -
onfido_country_select_bottom_sheet_details
(en, fr, es, de)
Breaking API Changes
- DocumentResult object now contains front and back capture objects. If passport captured then only front is set and back is nil. To access the document front result use documentResult.front.id instead of documentResult.id. Href, createdAt, fileName, fileType, fileSize properties are no longer supported for DocumentResult and FaceResult. Now only returning a single DocumentResult and FaceResult object (last capture).
Added
The following string keys have been added :
-
onfido_doc_confirmation_alert_crop_detail
(en, fr, de, es) -
onfido_doc_confirmation_alert_crop_title
(en, fr, de, es) -
onfido_doc_upload_progress_label
(en, fr, de, es)
-
onfido_doc_capture_frame_accessibility_pp_auto
(en, fr, es, de) -
onfido_doc_capture_frame_accessibility_pp_manual
(en, fr, es, de) -
onfido_doc_capture_frame_accessibility_dl_front_manual
(en, fr, es, de) -
onfido_doc_capture_frame_accessibility_dl_back_manual
(en, fr, es, de) -
onfido_doc_capture_frame_accessibility_dl_front_auto
(en, fr, es, de) -
onfido_doc_capture_frame_accessibility_dl_back_auto
(en, fr, es, de) -
onfido_doc_capture_frame_accessibility_ic_front_manual
(en, fr, es, de) -
onfido_doc_capture_frame_accessibility_ic_back_manual
(en, fr, es, de) -
onfido_doc_capture_frame_accessibility_rp_front_manual
(en, fr, es, de) -
onfido_doc_capture_frame_accessibility_rp_back_manual
(en, fr, es, de) -
onfido_doc_capture_frame_accessibility_dl_fr_front_manual
(en, fr, es, de) -
onfido_doc_capture_frame_accessibility_dl_fr_back_manual
(en, fr, es, de) -
onfido_doc_capture_frame_accessibility_ic_it_front_manual
(en, fr, es, de) -
onfido_doc_capture_frame_accessibility_ic_it_back_manual
(en, fr, es, de) -
onfido_doc_capture_frame_accessibility_ic_za_front_manual
(en, fr, es, de) -
onfido_doc_capture_frame_accessibility_ic_za_back_manual
(en, fr, es, de)
-
onfido_country_select_search_results_none_accessibility
(en, fr, es, de) -
onfido_country_select_search_results_one_accessibility
(en, fr, es, de) -
onfido_country_select_search_results_multiple_accessibility
(en, fr, es, de)
Changed
The following string keys have been changed :
-
onfido_doc_confirmation_button_primary_license
(en, fr, de, es) -
onfido_doc_confirmation_button_primary_generic
(en, fr, de, es) -
onfido_doc_confirmation_button_primary_id
(en, fr, de, es) -
onfido_doc_confirmation_button_primary_passport
(en, fr, de, es) -
onfido_doc_confirmation_button_primary_permit
(en, fr, de, es) -
onfido_doc_confirmation_button_primary_visa
(en, fr, de, es) -
onfido_welcome_list_header_photo
(en, fr, de, es) -
onfido_welcome_list_header_record
(en, fr, de, es) -
onfido_doc_confirmation_button_primary
(en, fr, de, es) -
onfido_welcome_list_item_doc
(en, fr, de, es) -
onfido_welcome_list_item_selfie
(en, fr, de, es) -
onfido_welcome_list_item_video
(en, fr, de, es)
-
onfido_video_intro_list_item_move_speak
(en, fr, es, de) -
onfido_video_intro_list_item_time_limit
(en, fr, es, de)
-
onfido_selfie_capture_frame_accessibility
(fr, de)
-
onfido_doc_capture_header_passport_auto
(en, fr, es, de)
-
onfido_selfie_capture_frame_accessibility
(en, fr, es, de) -
onfido_video_capture_frame_accessibility
(en, fr, es, de)
-
onfido_video_intro_video_accessibility
(en, fr, es, de)
Added
The following string keys have been added :
-
onfido_app_title_user_consent
(en, es, fr, de) -
onfido_user_consent_prompt_no_consent_title
(en, es, fr, de) -
onfido_user_consent_prompt_no_consent_detail
(en, es, fr, de) -
onfido_user_consent_prompt_button_primary
(en, es, fr, de) -
onfido_user_consent_prompt_button_secondary
(en, es, fr, de) -
onfido_user_consent_button_primary
(en, es, fr, de) -
onfido_user_consent_button_secondary
(en, es, fr, de)
Breaking API Changes
- Now SDK sends selected document country information to the backend. If an incorrect country value has been set when configuring the Document step see documentation , SDK will throw an error during document upload
Added
The following string keys have been added :
-
onfido_generic_alert_network_error_label
(en, fr, de, es) -
onfido_generic_uploading
(en, fr, de, es) -
onfido_generic_alert_network_error_button_primary
(en, fr, de, es) -
onfido_info_tablet_orientation_subtitle
(en, fr, de, es) -
onfido_info_tablet_orientation_title
(en, fr, de, es) -
onfido_info_tablet_orientation_body
(en, fr, de, es)
Removed
The following string keys have been removed :
-
onfido_accessibility_liveness_confirmation_view
(en, fr, de, es) -
onfido_decline
(en, fr, de, es) -
onfido_label_doc_type_driving_license_up
(en, fr, de, es) -
onfido_label_doc_type_id_card_up
(en, fr, de, es) -
onfido_label_doc_type_residence_permit_up
(en, fr, de, es) -
onfido_message_capture_face
(en, fr, de, es) -
onfido_liveness_preparation_subtitle
(en, fr, de, es)
-
onfido_error_dialog_title
(en, fr, de, es) -
onfido_message_uploading
(en, fr, de, es) -
onfido_ok
(en, fr, de, es) -
onfido_orientation_message_subtitile_ios
(en, fr, de, es) -
onfido_orientation_message_title_ios
(en, fr, de, es) -
onfido_orientation_upsidedown_message_ios
(en, fr, de, es)
Changed
Most localisation keys now renamed. Use migrate-keys.rb script and key mapping file key_migration_18_7_0_mapping.json to migrate from 18.7.0 to 18.8.0. To use run following command:
migrate-keys.rb --files-path [Path to lproj directories] --platform ios --key-mapping-file key_migration_18_7_0_mapping.json
Onfido iOS SDK 18.7.0 Migration Guide
The Onfido SDK require CoreNFC to run from 18.7.0. Since Xcode 12 there is bug where
libnfshared.dylib
is missing from simulators which is required for CoreNFC to work. See
stackoverflow
to solve this problem.
Added
The following string keys have been added :
-
onfido_nfc_option_title
(en, fr, es, de) -
onfido_nfc_option_subtitle
(en, fr, es, de) -
onfido_nfc_option_epassport_symbol
(en, fr, es, de) -
onfido_nfc_option_button_primary
(en, fr, es, de) -
onfido_nfc_option_button_secondary
(en, fr, es, de) -
onfido_nfc_intro_title
(en, fr, es, de) -
onfido_nfc_intro_subtitle
(en, fr, es, de) -
onfido_nfc_intro_button_primary
(en, fr, es, de) -
onfido_nfc_sheet_ready_instruction
(en, fr, es, de) -
onfido_nfc_sheet_scanning_subtitle
(en, fr, es, de) -
onfido_nfc_failed_title
(en, fr, es, de) -
onfido_nfc_failed_list_item_remove_covers
(en, fr, es, de) -
onfido_nfc_failed_list_item_keep_contact
(en, fr, es, de) -
onfido_nfc_failed_button_primary
(en, fr, es, de) -
onfido_nfc_failed_button_secondary
(en, fr, es, de)
Added
The following string keys have been added :
-
onfido_selfie_intro_button
-
onfido_selfie_confirmation_confirm_button
-
onfido_selfie_confirmation_retake_button
-
onfido_liveness_intro_button
-
onfido_flow_intro_subtitle
-
onfido_doc_type_selection_passport_option
-
onfido_doc_type_selection_driving_license_option
-
onfido_doc_type_selection_identity_card_option
-
onfido_doc_type_selection_residence_permit_option
-
onfido_doc_type_selection_title
-
onfido_doc_type_selection_subtitle
-
onfido_selfie_capture_instructions
-
onfido_liveness_capture_instructions
Changed
The following string keys have been changed :
-
onfido_confirm_driving_license
(en) -
onfido_confirm_generic_document
(en) -
onfido_confirm_national_id
(en) -
onfido_confirm_passport
(en) -
onfido_confirm_residence_permit
(en) -
onfido_confirm_visa
(en) -
onfido_discard
(en) -
onfido_welcome_view_title
(en) -
onfido_capture_face_subtitle
(en) -
onfido_capture_face_step_1
(en) -
onfido_capture_face_step_2
(en) -
onfido_liveness_intro_title
(en) -
onfido_liveness_intro_subtitle
(en) -
onfido_submit_video
(en) -
onfido_welcome_view_toolbar_title
(en) -
onfido_message_check_readability_subtitle_driving_license
(en) -
onfido_message_check_readability_subtitle_generic
(en) -
onfido_message_check_readability_subtitle_national_id
(en) -
onfido_message_check_readability_subtitle_passport
(en) -
onfido_message_check_readability_subtitle_residence_permit
(en) -
onfido_message_check_readability_subtitle_visa
(en) -
onfido_message_confirm_face_subtitle
(en)
Removed
The following string keys have been removed :
-
onfido_confirm_face_long
-
onfido_discard_face_long
-
onfido_welcome_view_face_capture_title_ios
-
onfido_confirm_face_2
-
onfido_continue
-
onfido_welcome_view_time
-
onfido_document_selection_title
-
onfido_document_selection_subtitle
-
onfido_message_capture_face
Breaking API Changes
- The way to configure SDK for document capture step has changed. To see instructions and usage examples please check out README page.
Breaking API changes
-
The deprecated
withApplicant()
function has been removed . If you're usingwithApplicant()
function to create an applicant, please refer to README to understand how to create an applicant. Once you created it, usewithApplicantId
function to passid
value of applicant. -
Following with
withApplicant()
function removal,OnfidoConfigError.multipleApplicants
andONFlowResultType.applicant
enum cases have been removed .Note : This change doesn't affect the integrators who use SDK token (
withSDKToken()
) to configure the SDK as applicant creation happens before SDK token generation.
Strings
The following string keys have been added :
-
onfido_flow_intro_summary_photo_capture_steps
-
onfido_flow_intro_summary_photo_video_capture_steps
-
onfido_flow_intro_summary_button_document_step
-
onfido_capture_face_title
-
onfido_liveness_intro_title
-
onfido_liveness_challenge_turn_face_forward
-
onfido_message_side_document_front_driving_license_autocapture
-
onfido_message_side_document_back_driving_license_autocapture
The following string keys have been changed :
-
onfido_welcome_view_document_capture_title
-
onfido_welcome_view_face_capture_title
-
onfido_welcome_view_liveness_capture_title
-
onfido_mrz_not_detected_subtitle
-
onfido_barcode_error_title
-
onfido_barcode_error_subtitle
-
onfido_liveness_challenge_turn_right_title
-
onfido_liveness_challenge_turn_left_title
-
onfido_message_document_passport
-
onfido_message_passport_capture_subtitle
-
onfido_message_document_visa
-
onfido_message_visa_capture_subtitle
-
onfido_message_side_document_front_driving_license
-
onfido_message_document_capture_info_front_driving_license
-
onfido_message_side_document_back_driving_license
-
onfido_message_document_capture_info_back_driving_license
-
onfido_message_side_document_front_residence_permit
-
onfido_message_document_capture_info_front_residence_permit
-
onfido_message_side_document_back_residence_permit
-
onfido_message_document_capture_info_back_residence_permit
-
onfido_message_side_document_front_national_id
-
onfido_message_document_capture_info_front_national_id
-
onfido_message_side_document_back_national_id
-
onfido_message_document_capture_info_back_national_id
-
onfido_message_side_document_front_generic
-
onfido_message_document_capture_info_front_generic
-
onfido_message_side_document_back_generic
-
onfido_message_document_capture_info_back_generic
The following string keys have been removed :
-
onfido_barcode_error_third_title
Strings
The following string keys have been added :
-
onfido_italian_id_capture_title
-
onfido_french_driving_license_capture_title
-
onfido_folded_paper_option
-
onfido_plastic_card_option
-
onfido_driving_license_type_selection_title
-
onfido_national_identity_type_selection_title
-
onfido_folded_paper_front_capture_title
-
onfido_folded_paper_front_capture_subtitle
-
onfido_folded_paper_back_capture_title
-
onfido_folded_paper_back_capture_subtitle
-
onfido_folded_paper_confirmation_title
-
onfido_upload_photo
-
onfido_retake_photo
Strings
The following string keys have been added :
-
onfido_blur_detection_title
-
onfido_blur_detection_subtitle
-
onfido_label_doc_type_generic_up
-
onfido_mrz_not_detected_title
-
onfido_mrz_not_detected_subtitle
-
onfido_face_not_detected_title
-
onfido_face_not_detected_subtitle
-
onfido_face_not_detected_subtitle_folded_paper_document
Breaking API changes
-
New document type added:
generic
-
The way to configure SDK for document types has been changed for Objective-C Interface
Driving Licence (United Kingdom) document capture:
ONFlowConfigBuilder *configBuilder = [ONFlowConfig builder]; NSError *documentVariantError = NULL; DocumentConfigBuilder *documentVariantBuilder = [ONDocumentTypeVariantConfig builder]; [documentVariantBuilder withDrivingLicence]; ONDocumentTypeVariantConfig *documentStepVariant = [documentVariantBuilder buildAndReturnError: &documentVariantError]; [configBuilder withDocumentStepOfType:documentStepVariant andCountryCode:@"GBR"];
Generic (United Kingdom) document capture:
ONFlowConfigBuilder *configBuilder = [ONFlowConfig builder]; NSError *documentVariantError = NULL; DocumentConfigBuilder *documentVariantBuilder = [ONDocumentTypeVariantConfig builder]; [documentVariantBuilder withGenericWithConfig: NULL]; ONDocumentTypeVariantConfig *documentStepVariant = [documentVariantBuilder buildAndReturnError: &documentVariantError]; [configBuilder withDocumentStepOfType:documentStepVariant andCountryCode:@"GBR"];
Changed
- Carthage json file name was changed. Please check the README for the details.
Strings
The following string keys have been added :
-
onfido_autocapture_manual_fallback_title
-
onfido_autocapture_manual_fallback_description
The following string keys have been updated :
-
onfido_message_visa_capture_subtitle
(french only) -
onfido_autocapture_manual_fallback_title
(french only) -
onfido_autocapture_manual_fallback_description
(french only) -
onfido_accessibility_video_play
(french only)
The following string keys have been removed :
-
onfido_autocapture_info
-
onfido_press_button_capture
-
onfido_submit_my_picture
Strings
The following string values for keys have been changed :
-
onfido_label_doc_type_driving_license_up
(english) -
onfido_message_document_passport
(english) -
onfido_glare_detected_title
(english) -
onfido_liveness_challenge_turn_left_title
(english) -
onfido_liveness_challenge_turn_right_title
(english) -
onfido_liveness_fetch_challenge_error_title
(english) -
onfido_welcome_view_face_capture_title
(spanish) -
onfido_liveness_preparation_subtitle
(spanish) -
onfido_message_document_passport
(spanish) -
onfido_message_side_document_front_driving_license
(spanish) -
onfido_message_document_capture_info_front_driving_license
(spanish) -
onfido_message_side_document_back_driving_license
(spanish) -
onfido_message_document_capture_info_back_driving_license
(spanish) -
onfido_message_side_document_front_residence_permit
(spanish) -
onfido_message_document_capture_info_front_residence_permit
(spanish) -
onfido_message_side_document_back_residence_permit
(spanish) -
onfido_message_document_capture_info_back_residence_permit
(spanish) -
onfido_message_side_document_front_national_id
(spanish) -
onfido_message_document_capture_info_front_national_id
(spanish) -
onfido_message_side_document_back_national_id
(spanish) -
onfido_message_document_capture_info_back_national_id
(spanish) -
onfido_message_side_document_front_generic
(spanish) -
onfido_message_document_capture_info_front_generic
(spanish) -
onfido_message_document_capture_info_back_generic
(spanish) -
onfido_message_check_readability_subtitle_passport
(spanish) -
onfido_message_check_readability_subtitle_residence_permit
(spanish) -
onfido_message_check_readability_subtitle_driving_license
(spanish) -
onfido_message_check_readability_subtitle_national_id
(spanish) -
onfido_message_check_readability_subtitle_visa
(spanish) -
onfido_message_check_readability_subtitle_generic
(spanish) -
onfido_confirm_national_id
(spanish) -
onfido_confirm_face_2
(spanish) -
onfido_no_face
(spanish) -
onfido_message_validation_error_face
(spanish) -
onfido_multiple_faces
(spanish) -
onfido_message_validation_error_multiple_faces
(spanish) -
onfido_liveness_preparation_subtitle
(spanish) -
onfido_liveness_timeout_exceeded_title
(spanish) -
onfido_retake_video
(spanish) -
onfido_discard
(spanish) -
onfido_decline
(spanish)
Breaking API changes
-
Introduced two new enum case for OnfidoConfigError:
- OnfidoConfigError.multipleTokenTypes (ONFlowConfigErrorMultipleTokenTypes for Objective-C): This error will be thrown when both an SDK Token and a Mobile Tokens are provided.
- OnfidoConfigError.applicantProvidedWithSDKToken (ONFlowConfigErrorApplicantProvidedWithSDKToken for Objective-C): This error will be thrown when both an SDK Token and an applicant provided.
Breaking API changes
- Face capture with photo variant:
let configBuilder = OnfidoConfig.builder() configBuilder.withFaceStep(ofVariant: .photo(with: nil))
- Face capture with video variant (showing liveness intro video):
let configBuilder = OnfidoConfig.builder() configBuilder.withFaceStep(ofVariant: .video(with: nil))
or
let configBuilder = OnfidoConfig.builder() configBuilder.withFaceStep(ofVariant: .video(with: VideoStepConfiguration(showIntroVideo: true)))
- Face capture with video variant (not showing liveness intro video):
let configBuilder = OnfidoConfig.builder() configBuilder.withFaceStep(ofVariant: .video(with: VideoStepConfiguration(showIntroVideo: false)))
Objective-C Interface
- Face capture with photo variant:
NSError * error = NULL; ONFlowConfigBuilder *configBuilder = [ONFlowConfig builder]; Builder * variantBuilder = [ONFaceStepVariantConfig builder]; [variantBuilder withPhotoCaptureWithConfig: NULL]; [configBuilder withFaceStepOfVariant: [variantBuilder buildAndReturnError: &error]];
- Face capture with video variant:
NSError * error = NULL; ONFlowConfigBuilder *configBuilder = [ONFlowConfig builder]; Builder * variantBuilder = [ONFaceStepVariantConfig builder]; [variantBuilder withVideoCaptureWithConfig: NULL]; [configBuilder withFaceStepOfVariant: [variantBuilder buildAndReturnError: &error]];
or
NSError * error = NULL; ONFlowConfigBuilder *configBuilder = [ONFlowConfig builder]; Builder * variantBuilder = [ONFaceStepVariantConfig builder]; [variantBuilder withVideoCaptureWithConfig: NULL]; [configBuilder withFaceStepOfVariant: [variantBuilder buildAndReturnError: &error]];
Deprecated
-
Onfido-Release
framework is deprecated and will be removed in a future version of the Onfido SDK.
If using Cocoapods change
Podfile
from:
pod 'Onfido', :configurations => ['Debug'] pod 'Onfido-Release', :configurations => ['Release']
to:
pod 'Onfido'
For manual installation add a Run Script Phase to your app
Build Phases
after
Embed Frameworks
step with the following code:
if [[ "$ACTION" != "install" ]]; then exit 0; FRAMEWORK_DIR="${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" ONFIDO_FRAMEWORK="${FRAMEWORK_DIR}/Onfido.framework" cd "${ONFIDO_FRAMEWORK}" lipo -remove i386 Onfido -o Onfido lipo -remove x86_64 Onfido -o Onfido
Strings
The following string keys have been added :
-
onfido_wrong_side
-
onfido_device_permission_title_both
-
onfido_device_permission_subtitle_both
-
onfido_device_permission_instructions_both
-
onfido_device_permission_btn_title_both
-
onfido_device_permission_title_camera
-
onfido_device_permission_subtitle_camera
-
onfido_device_permission_instructions_camera
-
onfido_device_permission_btn_title_camera
-
onfido_device_permission_title_mic
-
onfido_device_permission_subtitle_mic
-
onfido_device_permission_instructions_mic
-
onfido_device_permission_btn_title_mic
-
onfido_message_uploading
-
onfido_label_doc_type_work_permit_up
-
onfido_message_side_document_front_generic
-
onfido_message_document_capture_info_front_generic
-
onfido_message_side_document_back_generic
-
onfido_message_document_capture_info_back_generic
-
onfido_message_check_readability_subtitle_work_permit
-
onfido_confirm_generic_document
Strings
The following string keys have been added :
-
onfido_start
-
onfido_welcome_view_title
-
onfido_welcome_view_time
-
onfido_welcome_view_document_capture_title
-
onfido_welcome_view_face_capture_title
-
onfido_welcome_view_liveness_capture_title
-
onfido_capture_face_subtitle
-
onfido_capture_face_step_1
-
onfido_capture_face_step_2
The following string keys have been changed :
-
onfido_country_selection_toolbar_title
-
onfido_unsupported_document_description
The following string keys have been removed :
-
onfido_liveness_challenge_next
-
onfido_liveness_challenge_stop
-
onfido_liveness_challenge_recording
Strings
The following string keys have been added :
-
onfido_liveness_intro_subtitle
-
onfido_reload
-
onfido_unable_load_unstable_network
-
onfido_liveness_intro_step_1_title
-
onfido_liveness_intro_step_2_title
-
onfido_welcome_view_liveness_capture_title
-
onfido_liveness_intro_loading_video
The following string keys have been removed :
-
onfido_liveness_intro_title
-
onfido_liveness_intro_fourth_subtitle
Strings
The following string keys have been added :
-
onfido_accessibility_camera_capture_shutter
-
onfido_accessibility_liveness_start_record
-
onfido_accessibility_liveness_end_record
-
onfido_accessibility_liveness_next_challenge
-
onfido_label_doc_type_visa_up
-
onfido_message_document_visa
-
onfido_message_visa_capture_subtitle
-
onfido_message_check_readability_subtitle_visa
-
onfido_confirm_visa
Results objects
In version 9.0.0 we have brought some changes to the api response object (appended with
Result
).
-
ApplicantResult
'sid
,href
,firstName
andlastName
properties are no longer optional. -
FaceResults
'sid
,href
andcreatedAt
(renamedcreated_at
) properties are no longer optional. - Results properties now camel-cased instead of snake-cased.
-
Results objects, except those preappended with
ON
, no longer inherit fromNSObject
.
Deployment target
Version 8.0.0 raises the minimum iOS version from 8.0 to 9.0. If you are still using version iOS 8.0 then you must now check if the running iOS version is at least 9.0 before invoking Onfido SDK. You can do it using the following:
if #available(iOS 9.0, *) { // call onfido here } else { // can't verify user
Alternatively you can use a
guard
:
guard #available(iOS 9.0, *) else { // can't verify user
Flow dismissal
With this release we have brought a breaking change for all integrations. The default behaviour now is upon completion of the flow (user cancels, error occurs or user goes through the whole flow), the flow will dismiss itself. You can still maintain previous behaviour and dismiss the flow at your convenience by setting
dismissFlowOnCompletion
argument to false on the method call
with(responseHandler: _, shouldDismissFlowOnCompletion: _)
. For example:
Swift
OnfidoFlow(withConfiguration: config) .with(responseHandler: { /* handle response */ }, dismissFlowOnCompletion: false) .run()
Objective-C
ONFlow *onFlow = [[ONFlow alloc] initWithFlowConfiguration:config]; void (^responseHandler)(ONFlowResponse *response) = ^(ONFlowResponse *response) { // handle response [onFlow withResponseHandler:responseHandler dismissFlowOnCompletion:false];
Onfido SDK 7.2.0 Migration Guide
With this release we have brought a breaking change only for customised languages integrators .
The following string keys has been added :
-
"onfido_barcode_error_title"
-
"onfido_barcode_error_subtitle"
-
"onfido_barcode_error_third_title"
-
"onfido_error_dialog_title"
-
"onfido_error_connection_message"
-
"onfido_suggested_country"
-
"onfido_all_countries"
-
"onfido_country_selection_toolbar_title"
-
"onfido_unsupported_document_title"
-
"onfido_unsupported_document_description"
-
"onfido_select_another_document"
-
"onfido_close"
Onfido SDK 7.1.0 Migration Guide
With this release we have brought a breaking change only for customised languages integrators .
We have added the following string keys:
-
"onfido_document_selection_title"
-
"onfido_document_selection_subtitle"
We have removed the following string keys:
-
"onfido_document_selection_message"
Onfido SDK 7.0.0 Migration Guide
With this release we have brought a breaking change only for customised languages integrators .
Note : The string custom translation version scheme has changed, going forward if the strings translations change it will result in a MINOR version change, therefore you are responsible for testing your translated layout in case you are using custom translations.
We have added the following string keys:
-
"onfido_no_document"
-
"onfido_no_face"
-
"onfido_multiple_faces"
-
"onfido_message_validation_error_document"
-
"onfido_message_validation_error_face"
We have removed the following string keys:
-
"onfido_no_document_error_message"
-
"onfido_message_validation_error_no_face"
Please update your custom languages accordingly. Otherwise the language will fallback to English by default.
Onfido SDK 5.5.0 Migration Guide
While this is a minor release there are memory management improvements which means it's no longer necessary to keep a strong reference to
OnfidoFlow
for the swift interface (objective C interface still needs it). This means you can create the object, use it and not have to keep it as a property.
Applicants
We have deprecated
OnfidoConfig.builder().withApplicant(applicant)
in favour of
OnfidoConfig.builder().withApplicantId(applicantId)
. We now recommend that you create an Onfido applicant yourself on your backend and pass the applicant ID to the SDK. Similarly the applicantResult object in the
responseHandler
is also deprecated. Both
withApplicant
and
applicantResult
will continue to work as before, but will be removed in the next major release of the SDK.
Configuring and Running SDK
We have been given feedback that API could be easier to integrate with. We have learnt from our customers how they use the SDK and applied that knowledge, together with the lessons learned, in order to provide better experience and cut down on the SDK integration time.
The code below compares a simple configuration of document and face capture with upload to the Onfido API.
Note: Capture only configurations are no longer supported
// Onfido iOS SDK 3 let applicant = Applicant.new( firstName: "Theresa", lastName: "May" let onfidoFlow = OnfidoFlow(apiToken: "YOUR_MOBILE_TOKEN", allowAnalytics: false) .and(capture: [.document, .livePhoto]) .and(create: [.applicant(applicant), .document(validate:true), .livePhoto]) .and(handleResponseWith: { results in // Callback when flow ends // Onfido iOS SDK 4.0.0 let applicant = Applicant.new( firstName: "Theresa", lastName: "May" Note: option to disable analytics no longer supported let config = try! OnfidoConfig.builder() .withToken("YOUR_TOKEN_HERE") .withApplicant(applicant) .withDocumentStep() .withFaceStep(ofVariant: .photo) .build() let onfidoFlow = OnfidoFlow(withConfiguration: config) .with(responseHandler: { results in // Callback when flow ends
The document step capture with a pre-selected document type with country has also changed in the new API.
// Onfido iOS SDK 3 let applicant = Applicant.new( firstName: "Theresa", lastName: "May" let onfidoFlow = OnfidoFlow(apiToken: "YOUR_MOBILE_TOKEN") .and(capture: [.documentWith(documentType: .drivingLicence, countryCode: "GBR"), .livePhoto]) // .documentWith(documentType: _, countryCode: _) as capture option for document type pre-selection .and(create: [.applicant(applicant), .document(validate:true), .livePhoto]) .and(handleResponseWith: { results in // Callback when flow ends // Onfido iOS SDK 4.0.0 let applicant = Applicant.new( firstName: "Theresa", lastName: "May" let config = try! OnfidoConfig.builder() .withToken("YOUR_TOKEN_HERE") .withApplicant(applicant) .withDocumentStep(ofType: .drivingLicence(config: DrivingLicenceConfiguration(country: "GBR"))) // document type step with pre-selection .withFaceStep(ofVariant: .photo) .build() let onfidoFlow = OnfidoFlow(withConfiguration: config) .with(responseHandler: { results in // Callback when flow ends
Success handling
We have changed the way document results are handled and removed the capture image by the user.
// Onfido iOS SDK 3 let document: Optional<OnfidoResult> = results.filter({ result in if case OnfidoResult.document = result { return true } return false }).first if let documentUnwrapped = document, case OnfidoResult.document(validationResult: let documentResponse, data: let documentData) = documentUnwrapped { print(documentResponse.id) let image = UIImage(data: documentData) // Onfido iOS SDK 4.0.0 let document: Optional<OnfidoResult> = results.filter({ result in if case OnfidoResult.document = result { return true } return false }).first if let documentUnwrapped = document, case OnfidoResult.document(let documentResponse) = documentUnwrapped { print(documentResponse.description) // you can now find the image capture by accessing the following field: let imageUrl = documentResponse.href
We have changed
livePhoto
similarly to
document
(no capture returned), but additionally
OnfidoResult.livePhoto
has been renamed to
OnfidoResult.face
. The renamed enum value now takes a payload of
FaceResult
instead of
LivePhotoResult
, which also includes the result from video upload in the case where the face step specifies
.video
variant whilst configuring the SDK (pre-run).
// Onfido iOS SDK 3 let livePhoto: Optional<LivePhotoResult> = results.filter({ result in if case OnfidoResult.livePhoto = result { return true } return false }).first if let livePhotoUnwrapped = livePhoto, case OnfidoResult.livePhoto(validationResult: let documentResponse, data: let livePhotoData) = documentUnwrapped { print(livePhoto.id) let image = UIImage(data: livePhotoData) // Onfido iOS SDK 4.0.0 let faceResult: Optional<FaceResult> = results.filter({ result in if case OnfidoResult.face = result { return true } return false }).first if let faceUnwrapped = face, case OnfidoResult.face(let documentResponse, data: let faceResult) = faceUnwrapped { print(livePhoto.description) let imageUrl = livePhoto.href