iOS SDK Methods and Properties
A singleton for Oz SDK.
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 | Captured camera position |
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 | Captured camera position |
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.
Parameters
Parameter | Type | Description |
languageBundle | Bundle | The bundle that contains translations |
Returns
-
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 |
toFrameGradientColor | 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 |
A source of a license.
Case | Description |
licenseFilePath | An absolute path to a license (String). |
LicenseData | Full license information. |
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 |
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.
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 | |
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 |
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 |