Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
To integrate OZLivenessSDK into an Xcode project via the CocoaPods dependency manager, add the following code to Podfile:
Version is optional as, by default, the newest version is integrated. However, if necessary, you can find the older version number in Changelog.
Since 8.1.0, you can also use a simpler code:
By default, the full version is being installed. It contains both server-based and on-device analysis modes. To install the server-based version only, use the following code:
For 8.1.0 and higher:
Please note: installation via SPM is available for versions 8.7.0 and above.
Add the following package dependencies via SPM: https://gitlab.com/oz-forensics/oz-mobile-ios-sdk (if you need a guide on adding the package dependencies, please refer to the Apple documentation). OzLivenessSDK is mandatory. If you don't need the on-device analyses, skip the OzLivenessSDKOnDevice file.
You can also add the necessary frameworks to your project manually.
Download the SDK files from here and add them to your project.
OZLivenessSDK.xcframework,
OZLivenessSDKResources.bundle,
OZLivenessSDKOnDeviceResources.bundle (if you don't need the on-device analyses, skip this file).
Download the TensorFlow framework 2.11 from here.
Make sure that:
both xcframework are in Target-Build Phases -> Link Binary With Libraries and Target-General -> Frameworks, Libraries, and Embedded Context;
the bundle file(s) are in Target-Build Phases -> Copy Bundle Resources.
To connect SDK to Oz API, specify the API URL and access token as shown below.
Please note: in your host application, it is recommended that you set the API address on the screen that precedes the liveness check. Setting the API URL initiates a service call to the API, which may cause excessive server load when being done at the application initialization or startup.
Alternatively, you can use the login and password provided by your Oz Forensics account manager:
By default, logs are saved along with the analyses' data. If you need to keep the logs distinct from the analysis data, set up the separate connection for telemetry as shown below:
To start using Oz iOS SDK, follow the steps below.
Embed Oz iOS SDK into your project as described here.
Connect SDK to API as described here. This step is optional, as this connection is required only when you need to process data on a server. If you use the on-device mode, the data is not transferred anywhere, and no connection is needed.
Capture videos by creating the controller as described here. You'll send them for analysis afterwards.
Upload and analyze media you've taken at the previous step. The process of checking liveness and face biometry is described here.
If you want to customize the look-and-feel of Oz iOS SDK, please refer to this section.
Minimal iOS version: 11.
Minimal Xcode version: 15 for versions 8.10.0 and newer.
Available languages: EN, ES, HY, KK, KY, TR, PT-BR.
A sample app source code using the Oz Liveness SDK is located in the GitLab repository:
Follow the link below to see a list of SDK methods and properties:
Download the demo app latest build here.
You can generate the trial license here or contact us by email to get a productive license. To create the license, your bundle id
is required. After you get a license file, there are two ways to add the license to your project.
Rename this file to forensics.license and put it into the project. In this case, you don't need to set the path to the license.
During the runtime: when initializing SDK, use the following method.
or
LicenseSource
a source of license, and LicenseData
is the information about your license. Please note: this method checks whether you have an active license or not and if yes, this license won't be replaced with a new one. To force the license replacement, use the setLicense
method.
In case of any license errors, the system will use your error handling code as shown above. Otherwise, the system will return information about license. To check the license data manually, use OZSDK.licenseData
.
License error. License at (your_URI) not found
The license file is missing. Please check its name and path to the file.
License error. Cannot parse license from (your_URI), invalid format
The license file is somehow damaged. Please email us the file.
License error. Bundle company.application.id is not in the list allowed by license (bundle.id1, bundle.id2)
The bundle (application) identifier you specified is missing in the allowed list. Please check the spelling, if it is correct, you need to get another license for your application.
License error. Current date yyyy-mm-dd hh:mm:ss is later than license expiration date yyyy-mm-dd hh:mm:ss
Your license has expired. Please contact us.
License is not initialized.
You haven't initialized the license. Please add the license to your project as described above.
Master license is the offline license that allows using Mobile SDKs with any bundle_id
, unlike the regular licenses. To get a master license, create a pair of keys as shown below. Email us the public key, and we will email you the master license shortly after that.
Your application needs to sign its bundle_id
with the private key, and the Mobile SDK checks the signature using the public key from the master license. Master licenses are time-limited.
This section describes the process of creating your private and public keys.
To create a private key, run the commands below one by one.
You will get these files:
privateKey.der is a private .der key;
privateKey.txt is privateKey.der encoded by base64. This key containing will be used as the host app bundle_id signature.
File examples:
The OpenSSL command specification: https://www.openssl.org/docs/man1.1.1/man1/openssl-pkcs8.html
To create a public key, run this command.
You will get the public key file: publicKey.pub. To get a license, please email us this file. We will email you the license.
File example:
SDK initialization:
License setting:
Prior to the SDK initializing, create a base64-encoded signature for the host app bundle_id
using the private key.
Signature creation example:
Pass the signature as the masterLicenseSignature
parameter either during the SDK initialization or license setting.
If the signature is invalid, the initialization continues as usual: the SDK checks the list of bundle_id
included into the license like it does it by default without a master license.
Create a controller that will capture videos as follows:
action
– a list of user’s while capturing the video.
Once video is captured, the system calls the onOZLivenessResult
method:
The method returns the results of video capturing: the [
]
objects. The system uses these objects to perform checks.
If you use our SDK just for capturing videos, omit the Checking Liveness and Face Biometry step.
If a user closes the capturing screen manually, the failedBecauseUserCancelled
error appears.
To customize the Oz Liveness interface, use OZCustomization
as shown below. For the description of customization parameters, please refer to iOS SDK Methods and Properties.
Please note: the customization methods should be called before the video capturing ones.
If you want to get back to the previous (up to 6.4.2) versions' design, reset the customization settings of the capture screen and apply the parameters that are listed below.
Please note: this feature has been implemented in 8.1.0.
To add or update the language pack for Oz iOS SDK, use the set(languageBundle: Bundle)
method. It shows the SDK that you are going to use the non-standard bundle. In OzLocalizationCode
, use the custom language (optional).
The localization record consists of the localization key and its string value, e.g., "about" = "About"
.
If you don’t set the custom language and bundle, the SDK uses the pre-installed languages only.
If the custom bundle is set (and language is not), it has a priority when checking translations, i.e, SDK checks for the localization record in the custom bundle localization file. If the key is not found in the custom bundle, the standard bundle text for this key is used.
If both custom bundle and language are set, SDK retrieves all the translations from the custom bundle localization file.
A list of keys for iOS:
The keys Action.*.Task
refer to the appropriate gestures. Others refer to the hints for any gesture, info messages, or errors.
When new keys appear with new versions, if no translation is provided by your custom bundle localization file, you’ll see the default (English) text.
If you use our SDK just for capturing videos, omit this step.
To check liveness and face biometry, you need to upload media to our system and then analyze them.
To interpret the results of analyses, please refer to Types of Analyses.
Below, you'll see the example of performing a check and its description.
To delete media files after the checks are finished, use the cleanTempDirectory
method.
To add metadata to a folder, use AnalysisRequest.addFolderMeta
.
In the params
field of the Analysis
structure, you can pass any additional parameters (key + value), for instance, to extract the best shot on the server side.
To use a media file that is captured with another SDK (not Oz iOS SDK), specify the path to it in the OzMedia structure (the bestShotURL
property):
If you want to add your media to the existing folder, use the addFolderId
method:
iOS SDK changes
Changed the wording for the head_down gesture: the new wording is “tilt down”.
Added proper focus order for VoiceOver when the antiscam hint is enabled.
Added the public setting extract_action_shot in the Demo Application.
Bug fixes.
Security updates.
Accessibility updates according to WCAG requirements: the SDK hints and UI controls can be voiced.
Improved user experience with head movement gestures.
Minor bug fixes and telemetry updates.
The screen brightness no longer changes when the rear camera is used.
Fixed the video recording issues on some smartphone models.
Security and telemetry updates.
Internal SDK improvements.
Added Xcode 16 support.
Security and telemetry updates.
Security updates.
Bug fixes.
SDK now requires Xcode 15 and higher.
Security updates.
Bug fixes.
Internal SDK improvements.
Internal SDK improvements.
Bug fixes.
Logging updates.
Security updates.
The sample is now available on SwiftUI. Please find it here.
Added a description for the error that occurs when providing an empty string as an ID in the addFolderID
method.
Bug fixes.
The messages displayed by the SDK after uploading media have been synchronized with Android.
The bug causing analysis delays that might have occurred for the One Shot gesture has been fixed.
The length of the Selfie gesture is now configurable (affects the video file size).
You can set your own logo instead of Oz logo if your license allows it.
Removed the pause after the Scan gesture.
The code in Readme.md is now up-to-date.
Security and logging updates.
Security updates.
Changed the default behavior in case a localization key is missing: now the English string value is displayed instead of a key.
Fixed some bugs.
Internal licensing improvements.
Implemented the possibility of using a master license that works with any bundle_id
.
Fixed the bug with background color flashing.
Bug fixes.
The Analysis
structure now contains the sizeReductionStrategy
field. This field defines what type of media is being sent to the server in case of the hybrid analysis once the on-device analysis is finished successfully.
The messages for the errors that are retrieved from API are now detailed.
The toFrameGradientColor
option in hintAnimationCustomization
is now deprecated, please use the hintGradientColor
option instead.
Got back the iOS 11 support.
If multiple analyses are applied to the folder simultaneously, the system sends them as a group. It means that the “worst” of the results will be taken as resolution, not the latest. Please refer to this article for details.
For the Liveness analysis, the system now treats the highest score as a quantitative result. The Liveness analysis output is described here.
Updated the Liveness on-device model.
Added the Portuguese (Brazilian) locale.
You can now add a custom or update an existing language pack. The instructions can be found here.
If a media hasn't been uploaded correctly, the system now repeats the upload.
Added a new method to retrieve the telemetry (logging) identifier: getEventSessionId
.
The setPermanentAccessToken
, configure
and login
methods are now deprecated. Please use the setApiConnection
method instead.
The setLicense(from path:String)
method is now deprecated. Please use the setLicense(licenseSource: LicenseSource)
method instead.
Fixed some bugs and improved the SDK work.
Fixed some bugs and improved the SDK algorithms.
Added the new analysis mode – hybrid (Liveness only). If the score received from an on-device analysis is too high, the system initiates a server-based analysis as an additional check.
Improved the on-device models.
Updated the run method.
Added new structures: RequestStatus
(analysis state), ResultMedia
(analysis result for a single media) and RequestResult
(consolidated analysis result for all media).
The updated AnalysisResult
structure should be now used instead of OzAnalysisResult
.
For the OZMedia
object, you can now specify additional tags that are not included into our tags list.
The Selfie video length is now about 0.7 sec, the file size and upload time are reduced.
The hint text width can now exceed the frame width (when using the main camera).
The methods below are no longer supported:
Removed method
Replacement
analyse
AnalysisRequest.run
addToFolder
uploadMedia
documentAnalyse
AnalysisRequest.run
uploadAndAnalyse
AnalysisRequest.run
runOnDeviceBiometryAnalysis
AnalysisRequest.run
runOnDeviceLivenessAnalysis
AnalysisRequest.run
addMedia
uploadMedia
Added the center hint background customization.
Added new face frame forms (Circle, Square).
Added the antiscam widget and its customization. This feature allows you to alert your customers that the video recording is being conducted, for instance, for loan application purposes. The purpose of this is to safeguard against scammers who may attempt to deceive an individual into approving a fraudulent transaction.
Synchronized the default customization values with Android.
Added the Spanish locale.
iOS 11 is no longer supported, the minimal required version is 12.
Fixed the issue with the server-based One shot analysis.
Improved the SDK algorithms.
Fixed error handling when uploading a file to API. From this version, an error will be raised to a host application in case of an error during file upload.
Improved the on-device Liveness.
Fixed the animation for sunglasses/mask.
Fixed the bug with the .document
analysis.
Updated the descriptions of customization methods and structures.
Updated the TensorFlow version to 2.11.
Fixed several bugs, including the Biometry check failures on some phone models.
Added customization for the hint animation.
Integrated a new model.
Added the uploadMedia
method to AnalysisRequest
. The addMedia
method is now deprecated.
Fixed the combo analysis error.
Added a button to reset the SDK theme and language settings.
Fixed some bugs and localization issues.
Extended the network request timeout to 90 sec.
Added a setting for the animation icon size.
Implemented a range of UI customization options and switched to the new design. To restore the previous settings, please refer to this article.
The run
method now works similar to the one in Android SDK and returns an array of analysis' results.
Synchronized the version numbers with Android SDK.
Added a new field to the Analysis
structure. The params
field is for any additional parameters, for instance, if you need to set extracting the best shot on server to true. The best shot algorithm chooses the most high-quality frame from a video.
Fixed some localization issues.
Changed the Combo gesture.
Now you can launch the Liveness check to analyze images taken with another SDK.
The Zoom in and Zoom out gestures are no longer supported.
Added a new simplified analysis structure – AnalysisRequest
.
Added methods of on-device analysis: runOnDeviceLivenessAnalysis
and runOnDeviceBiometryAnalysis
.
You can choose the installation version. Standard installation gives access to full functionality. The core
version (OzLivenessSDK/Core
) installs SDK without the on-device functionality.
Added a method to upload data to server and start analyzing it immediately: uploadAndAnalyse
.
Improved the licensing process, now you can add a license when initializing SDK: OZSDK(licenseSources: [LicenseSource], completion: @escaping ((LicenseData?, LicenseError?) -> Void))
, where LicenseSource
is a path to physical location of your license, LicenseData
contains the license information.
Added the setLicense
method to force license adding.
Added the Turkish locale.
Added the Kyrgyz locale.
Added Completion Handler for analysis results.
Added Error User Info to telemetry to show detailed info in case of an analysis error.
Added local on-device analysis.
Added oval and rectangular frames.
Added Xcode 12.5.1+ support.
Added SDK configuration with licenses.
Added the One Shot gesture.
Improved OZVerificationResult
: added bestShotURL
which contains the best shot image and preferredMediaURL
which contains an URL to the best quality video.
When performing a local check, you can now choose a main or back camera.
Authorization sessions extend automatically.
Updated authorization interfaces.
Added the Kazakh locale.
Added license error texts.
You can cancel network requests.
You can specify Bundle for license.
Added analysis parameterization documentAnalyse
.
Fixed building errors (Xcode 12.4 / Cocoapods 1.10.1).
Added license support.
Added Xcode 12 support instead of 11.
Fixed the documentAnalyse
error where you had to fill analyseStates
to launch the analysis.
Fixed logging.
A singleton for Oz SDK.
Initializes OZSDK with the license data. The closure is either license data or LicenseError.
Parameter
Type
Description
licenseSources
The source of the license
Returns
-
Forces the license installation.
Parameter
Type
Description
licenseSource
Source of the license
Retrieves an access token for a user.
Parameter
Type
Description
apiConnection
Authorization parameters
Returns
The access token or an error.
Retrieves an access token for a user to send telemetry.
Parameter
Type
Description
eventsConnection
Telemetry authorization parameters
Returns
The access token or an error.
Checks whether an access token exists.
Parameters
-
Returns
The result – the true or false value.
Deletes the saved access token
Parameters
-
Returns
-
Creates the Liveness check controller.
Parameter
Type
Description
delegate
The delegate for Oz Liveness
actions
Captured action
cameraPosition (optional)
AVCaptureDevice.Position
front
– front camera (default),
back
– rear camera
Returns
UIViewController or an exception.
Creates the Liveness check controller.
Parameter
Type
Description
actions
Captured action
FaceCaptureCompletion
type alias used as follows:
public typealias FaceCaptureCompletion = (_ results: [OZMedia]?, _ error: OZVerificationStatus?) -> Void
cameraPosition (optional)
AVCaptureDevice.Position
front
– front camera (default),
back
– rear camera
Returns
UIViewController or an exception.
Deletes all videos.
Parameters
-
Returns
-
Retrieves the telemetry session ID.
Parameters
-
Returns
The telemetry session ID (String parameter).
Sets the bundle to look for translations in.
Parameter
Type
Description
languageBundle
Bundle
The bundle that contains translations
Returns
-
Sets the length of the Selfie gesture (in milliseconds).
Parameter
Type
Description
selfieLength
Int
The length of the Selfie gesture (in milliseconds). Should be within 500-5000 ms, the default length is 700
Generates the payload with media signatures.
Parameter
Type
Description
media
An array of media files
folderMeta
[String]
Additional folder metadata
Returns
Payload to be sent along with media files that were used for generation.
SDK locale (if not set, works automatically).
Parameter
Type
Description
localizationCode
The localization code
The host to call for Liveness video analysis.
Parameter
Type
Description
host
String
Host address
The holder for attempts counts before SDK returns error.
Parameter
Type
Description
singleCount
Int
Attempts on a single action/gesture
commonCount
Int
Total number of attempts on all actions/gestures if you use a sequence of them
faceAlignmentTimeout
Float
Time needed to align face into frame
uploadMediaSettings
Sets the number of attempts and timeout between them
The SDK version.
Parameter
Type
Description
version
String
Version number
A delegate for OZSDK.
Gets the Liveness check results.
Parameter
Type
Description
results
An array of the OzMedia objects.
Returns
-
The error processing method.
Parameter
Type
Description
status
The error description.
Returns
-
A protocol for performing checks.
Creates the AnalysisRequest instance.
Parameter
Type
Description
folderId (optional)
String
The identifier to define when you need to upload media to a certain folder.
Returns
The AnalysisRequest instance.
Adds an analysis to the AnalysisRequest instance.
Parameter
Type
Description
analysis
A structure containing information on the analyses required.
Returns
-
Uploads media on server.
Parameter
Type
Description
media
Media or an array of media objects to be uploaded.
Returns
-
Adds the folder ID to upload media to a certain folder.
Parameter
Type
Description
folderId
String
The folder identifier.
Returns
-
Adds metadata to a folder.
Parameter
Type
Description
meta
[String]
An array of metadata as follows:
["meta1": "data1"]
Returns
-
Runs the analyses.
Parameter
Type
Description
statusHandler
A callback function as follows:
The handler that is executed when the scenario state changes
errorHandler
A callback function as follows:
errorHandler: @escaping ((_ error: Error) -> Void)
Error handler
completionHandler
A callback function as follows:
The handler that is executed when the run method completes.
Returns
The analysis result or an error.
Customization for OzLivenessSDK (use OZSDK.customization
).
A set of customization parameters for the toolbar.
Parameter
Type
Description
closeButtonIcon
UIImage
An image for the close button
closeButtonColor
UIColor
Close button tintColor
titleFont
UIFont
Toolbar title text font
titleColor
UIColor
Toolbar title text color
backgroundColor
UIColor
Toolbar background color
titleText
String
Text on the toolbar
A set of customization parameters for the center hint that guides a user through the process of taking an image of themselves.
Parameter
Type
Description
textFont
UIFont
Center hint text font
textColor
UIColor
Center hint text color
backgroundColor
UIColor
Center hint text background
verticalPosition
Int
Center hint vertical position from the screen top (in %, 0-100)
hideTextBackground
Bool
Hides text background
backgroundCornerRadius
Int
Center hint background frame corner radius
A set of customization parameters for the hint animation.
Parameter
Type
Description
hideAnimation
Bool
A switcher for hint animation, if True
, the animation is hidden
animationIconSize
CGfloat
A side size of the animation icon square
hintGradientColor
UIColor
The close-to-frame gradient color
A set of customization parameters for the frame around the user face.
Parameter
Type
Description
geometryType
The frame type: oval, rectangle, circle, or square
cornerRadius
CGFloat
Rectangle corner radius (in dp)
strokeFaceNotAlignedColor
UIColor
Frame color when a face is not aligned properly
strokeFaceAlignedColor
UIColor
Frame color when a face is aligned properly
strokeWidth
CGFloat
Frame stroke width (in dp, 0-20)
strokePadding
CGFloat
A padding from the stroke to the face alignment area (in dp, 0-10)
A set of customization parameters for the background outside the frame.
Parameter
Type
Description
backgroundColor
UIColor
Background color
A set of customization parameters for the SDK version text.
Parameter
Type
Description
textFont
UIFont
SDK version text font
textColor
UIColor
SDK version text color
A set of customization parameters for the antiscam message that warns user about their actions being recorded.
Parameter
Type
Description
customizationEnableAntiscam
Bool
Adds the antiscam message
customizationAntiscamTextMessage
String
Antiscam message text
customizationAntiscamTextFont
UIFont
Antiscam message text font
customizationAntiscamTextColor
UIColor
Antiscam message text color
customizationAntiscamBackgroundColor
UIColor
Antiscam message text background color
customizationAntiscamCornerRadius
CGFloat
Background frame corner radius
customizationAntiscamFlashColor
UIColor
Color of the flashing indicator close to the antiscam message
Logo customization parameters. Custom logo should be allowed by license.
Parameter
Type
Description
image
UIImage
Logo image
size
CGSize
Logo size (in dp)
A source of a license.
Case
Description
licenseFilePath
An absolute path to a license (String)
licenseFileName
The name of the license file
The license data.
Parameter
Type
Description
appIDS
[String]
An array of bundle IDs
expires
TimeInterval
The expiration interval
features
Features
License features
configs (optional)
ABTestingConfigs
Additional configuration
Contains action from the captured video.
Case
Description
smile
Smile
eyes
Blink
scanning
Scan
selfie
A selfie with face alignment check
one_shot
The best shot from the video taken
left
Head turned left
right
Head turned right
down
Head tilted downwards
up
Head lifted up
Contains the locale code according to ISO 639-1.
Case
Description
en
English
hy
Armenian
kk
Kazakh
ky
Kyrgyz
tr
Turkish
es
Spanish
pt-BR
Portuguese (Brazilian)
custom(String)
Custom language (language ISO 639-1 code, two letters)
Contains all the information on the media captured.
Parameter
Type
Description
movement
User action type
mediaType
Type of media
metaData
[String] as follows:
["meta1": "data1"]
Metadata if any
videoURL
URL
URL of the Liveness video
bestShotURL
URL
URL of the best shot in PNG
preferredMediaURL
URL
URL of the API media container
timestamp
Date
Timestamp for the check completion
The type of media captured.
Case
Description
movement
A media with an action
documentBack
The back side of the document
documentFront
The front side of the document
Error description. These errors are deprecated and will be deleted in the upcoming releases.
Case
Description
userNotProcessed
The Liveness check was not processed
failedBecauseUserCancelled
The check was interrupted by user
failedBecauseCameraPermissionDenied
The Liveness check can't be performed: no camera access
failedBecauseOfBackgroundMode
The Liveness check can't be performed: background mode
failedBecauseOfTimeout
The Liveness check can't be performed: timeout
failedBecauseOfAttemptLimit
The Liveness check can't be performed: attempts limit exceeded
failedBecausePreparingTimout
The Liveness check can't be performed: face alignment timeout
failedBecauseOfLowMemory
The Liveness check can't be performed: no memory left
Contains information on what media to analyze and what analyses to apply.
Parameter
Type
Description
media
An array of the OzMedia objects
type
The type of the analysis
mode
The mode of the analysis
sizeReductionStrategy
Defines what type of media is being sent to the server in case of the hybrid analysis once the on-device analysis is finished successfully
params (optional)
String
Additional parameters
The type of the analysis.
Case
Description
biometry
The algorithm that allows comparing several media and check if the people on them are the same person or not
quality
The algorithm that aims to check whether a person in a video is a real human acting in good faith, not a fake of any kind.
document
The analysis that aims to recognize the document and check if its fields are correct according to its type.
blacklist
The analysis that compares a face on a captured media with faces from the pre-made media database.
Currently, the .document analysis can't be performed in the on-device mode.
The mode of the analysis.
Case
Description
onDevice
The on-device analysis with no server needed
serverBased
The server-based analysis
hybrid
The hybrid analysis for Liveness: if the score received from an on-device analysis is too high, the system initiates a server-based analysis as an additional check.
Shows the media processing status.
Case
Description
addToFolder
The system is creating a folder and adding files to this folder
addAnalyses
The system is adding analyses
waitAnalysisResult
The system is waiting for the result
Shows the files' uploading status.
Parameter
Type
Description
media
The object that is being uploaded at the moment
index
Int
Number of this object in a list
from
Int
Objects quantity
progress
Progress
Object uploading status
Shows the analysis processing status.
Parameter
Type
Description
status
Processing analysis status
progressStatus
Media uploading status
Describes the analysis result for the single media.
Parameter
Type
Description
resolution
Consolidated analysis result
sourceId
String
Media identifier
isOnDevice
Bool
Analysis mode
confidenceScore
Float
Resulting score
mediaType
String
Media file type: VIDEO / IMAGE / SHOT_SET
media
Media that is being analyzed
error
AnalysisError (inherits from Error)
Error
Contains the consolidated analysis results for all media.
Parameter
Type
Description
resolution
Consolidated analysis result
folderId
String
Folder identifier
analysisResults
A list of analysis results
Contains the results of the checks performed.
Parameter
Type
Description
resolution
Analysis resolution
type
Analysis type
mode
Analysis mode
analysisId
String
Analysis identifier
error
AnalysisError (inherits from Error)
Error
resultMedia
Results of the analysis for single media files
confidenceScore
Float
The resulting score
serverRawResponse
String
Server response
The general status for all analyses applied to the folder created.
Case
Description
INITIAL
No analyses have been applied yet
PROCESSING
The analyses are in progress
FAILED
One or more analyses failed due to some error and couldn't get finished
FINISHED
The analyses are finished
DECLINED
The check failed (e.g., faces don't match or some spoofing attack detected)
SUCCESS
Everything went fine, the check succeeded (e.g., faces match or liveness confirmed)
OPERATOR_REQUIRED
The result should be additionally checked by a human operator
Contains the results for single analyses.
Parameter
Type
Description
analyseResolutionStatus
The analysis status
type
The analysis type
folderID
String
The folder identifier
score
Float
The result of the check performed
Frame shape settings.
Case
Description
oval
Oval frame
rectangle(cornerRadius: CGFloat)
Rectangular frame (with corner radius)
circle
Circular frame
square(cornerRadius: CGFloat)
Square frame (with corner radius)
Possible license errors.
Case
Description
licenseFileNotFound
The license is not found
licenseParseError
Cannot parse the license file, the license might be invalid
licenseBundleError
The bundle_id
in the license file doesn't match with bundle_id
used.
licenseExpired
The license is expired
The authorization type.
Case
Description
fromServiceToken
Authorization with a token:
host: String
token: String
fromCredentials
Authorization with credentials:
host: String
login: String
password: String
Defines the settings for the repeated media upload.
attemptsCount
Int
Number of attempts for media upload
attemptsTimeout
Int
Timeout between attempts
Defines what type of media is being sent to the server in case of the hybrid analysis once the on-device analysis is finished successfully. By default, the system uploads the compressed video.
uploadOriginal
The original video
uploadCompressed
The compressed video
uploadBestShot
The best shot taken from the video
uploadNothing
Nothing is sent (note that no folder will be created)
[]
The handler that is executed when the method completes. The closure is either an array of objects or an .
[]
statusHandler: @escaping ((_ status:
) -> Void)
completionHandler: @escaping (_ results :
) -> Void)
[]
[]
[]