iOS - Core Module¶
The Core Module is the foundational infrastructure on which all modules of the EnQualify SDK are built. Each of the OCR, NFC, Face, VideoCall, and Utility modules is dependent on the Core Module — therefore, the Core must be properly configured before transitioning to any module.
What is described on this page applies to all modules. Only the module-specific differences will be addressed on the module pages.
Adding the SDK to the Project¶
EnQualify iOS SDK can be integrated directly into the project:
- Method: Add the SDK by embedding the xcframework directly into the project and installing the necessary dependencies via cocoapods.
// target 'MySampleProject' do
use_frameworks!
pod 'TensorFlowLiteSwift' # For identity detection
pod 'TensorFlowLiteSwift/Metal' # Identity detection
pod 'OpenSSL-Universal','3.3.2000' # CoreModule
pod 'GoogleWebRTC' # Video Call
pod 'Socket.IO-Client-Swift' # Video Call
pod 'GoogleMLKit/FaceDetection', '7.0.0' # Face and Liveness Detection
end
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['BUILD_LIBRARY_FOR_DISTRIBUTION'] = 'YES'
config.build_settings['EXPANDED_CODE_SIGN_IDENTITY'] = ""
config.build_settings['CODE_SIGNING_REQUIRED'] = "NO"
config.build_settings['CODE_SIGNING_ALLOWED'] = "NO"
config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = ""
config.build_settings['VALID_ARCHS'] = "arm64 x86_64"
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '15.5'
config.build_settings["ONLY_ACTIVE_ARCH"] = "YES"
end
end
end
Post-Installation Build Settings Explanation¶
BUILD_LIBRARY_FOR_DISTRIBUTION = YES:¶
Ensures that the framework is compiled in an optimized manner for distribution. This facilitates its use as a binary or shared framework in other projects. This setting is particularly important when creating an XCFramework.
EXPANDED_CODE_SIGN_IDENTITY = "":¶
Clears the Code Signing Identity; ensuring that no specific certificate is used during the build process.
CODE_SIGNING_REQUIRED = NO:¶
Disables the code signing requirement during the build process. This is useful in situations where signing is not required, such as during testing.
CODE_SIGNING_ALLOWED = NO:¶
Ensures that Code Signing is completely disabled.
EXCLUDED_ARCHS[sdk=iphonesimulator*] = "":¶
Removes all previously excluded architectures for the iPhone simulator. This setting ensures compatibility during the build process.
VALID_ARCHS = "arm64 x86_64":¶
Specifies valid architectures for the build. Here, arm64 (M Series) and x86_64 (for Intel-based Macs) are used.
IPHONEOS_DEPLOYMENT_TARGET = 15.5:¶
Sets the minimum iOS version supported by the application or framework. This ensures compatibility with devices running iOS 15.5 and above.
ONLY_ACTIVE_ARCH = YES:¶
Restricts the build process to only the active device/simulator architecture. This shortens the build time during development, enhancing efficiency.
PodFile Editing¶
#PodFile Example
source 'ssh://git@github.com/EnquraTechnology/EnQualifyiOSPackages.git'
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '15.5'
use_frameworks!
target 'YourApp' do
pod 'EnQualify/OCR', '2.0.0.1'
pod 'EnQualify/NFC', '2.0.0.1'
pod 'EnQualify/Face', '2.0.0.1'
pod 'EnQualify/VideoCall', '2.0.0.1'
# Other modules can be added.
end
Warning
XCFrameworks¶
- To directly integrate the EnQualify SDK into your project, you can add the core SDK files
OCRModule.xcframework,NFCModule.xcframework,FaceModule.xcframework,CoreModule.xcframework, andVideoCallModule.xcframeworkdirectly to your project files. - Alternatively, if you have already copied the XCFrameworks into your project, you can go to Project Settings > General and select Embed and Sign to add these frameworks to your project.
- For the dependencies of the EnQualify SDK added this way, you need to include the version numbers specified in the "podspec" file of the respective version or determined by the provider in your project.
EnQualify iOS SDK can be added to the project via CocoaPods or Swift Package Manager (SPM).
Installing EnQualify iOS SDK with CocoaPods¶
Method: To use the relevant module of EnQualifyPlus SDK, you need to modify the source in your pod file and enter the relevant pod name.
EnQualifyPlusSDK can be distributed as a private repo via Cocoapods, and for private repo access, you need to provide the RSA key and add this key to the known hosts.
Note
"your_email@example.com" will be the email address you need to use to access the git repository.
During the RSA key creation, you will be asked for a passphrase to make it easier to enter the encryption for commonly performed actions, and your operations will occur with this passphrase afterwards, so it must be a memorable and personal passphrase.
To add the created RSA key to known hosts, the relevant script is run.
The script to copy the generated RSA key is as follows.
The output of this script should look like the following.
// RSA KEY SAMPLE
ssh-rsa AAAAMIICXAIBAAKBgQCGwZBAR3F1vaJCdXdE15/n5TApKcGR3qBCTJCrPNIDO+qyhs4z
rZmxbTfNwOp8w8qXwt/daZ/JatByFoW02A+4+dvgUPuKWvs3Z9Ts9xH70Qw4mT8z
joMKcLcIViTD4m4yLQnjncP+HYp8LPL+mbUtLEemyobJsVOVJKmUYcovLQIDAQAB
AoGAeQVTMHc5DV2+YGMwNvJTWKa7BuzKO9+tG325mx+nGGJyF9z7SOwKkI6exDkS
HfSUeJD6DdXzO6ejBiL194DnNIRy+tZVIxUhNlL67rw+H8WoEqzzCLTrglakDes/
BAy2vQtdBOuxNXmudROQVAM/mjDSbMRaF+HA/+ytF3nb4b0CQQD23u18NwT69lGM
YMHuWC1FPu5q5UBXSqUDDCQxELnyxwxx2TbpDld45qPzQbYWxcvLTQmwSco2icVu
2kdjUC3TAkEAi71FMCJHDc2Zs1h/Zqv75Swahw6Nczd6Mlws5wLGNfs3T8GvwrFW
/9vKDfTOn0l2JECn50D1mSKuqNkd== your_mail@example.com
By delivering this key to the relevant person, you will gain access to the private repo. To pull the EnQualifySDK from the private repo, the following script should be run.
// Pod Repo Add enquratechnology
pod repo add enquratechnology-enqualifyiospackages ssh://git@github.com/EnquraTechnology/EnQualifyiOSPackages.git
With these operations, the EnQualifyPlus SDK will now be obtainable.
Installing EnQualify iOS SDK with Swift Package Manager (SPM)¶
To utilize the relevant module of EnQualifyPlus SDK, SSH access must be provided to the private repository on GitHub.
The following steps describe the necessary SSH configuration for Xcode and SPM to access the private repository seamlessly.
First, check if the .ssh folder exists on your system.
An SSH agent is started to manage SSH keys.
A new SSH key is created for GitHub access.
Info
"your_email@example.com" will be the email address you need to use to access the git repository.
This key will be used for GitHub access by SPM and Xcode.
The created SSH key is added to macOS Keychain and SSH agent.
This process prevents the password prompt from appearing during Xcode usage.
The public key is copied with the following command:
The SSH configuration for GitHub is defined as follows.
Host github.com
HostName github.com
User git
IdentityFile ~/.ssh/id_github
UseKeychain yes
AddKeysToAgent yes
IdentitiesOnly yes
This configuration ensures that the correct SSH key is used for GitHub connections.
To prevent security warnings that may arise during the initial connection, GitHub is added to the known_hosts list.
The connection is tested to verify that the SSH configuration is working correctly.
Once these configurations are complete, Xcode and Swift Package Manager (SPM) will be able to access private repositories on GitHub seamlessly via SSH, and the EnQualify iOS SDK can be securely integrated into the project.
Info
The 'ssh://git@github.com/EnquraTechnology/EnQualifyiOSPackages.git' in the Source section is required to access the private repo.
EnQualify SDK and Simulator Support¶
The EnQualify SDK does not run on the simulator target due to its use of camera tools, but it can be successfully compiled. To ensure compilability, the Other Linker Flags settings for the relevant targets need to be adjusted.
Configuration Steps¶
-
Settings in Xcode:
-
Go to Project Target > Build Settings and find the OTHER_LDFLAGS section.
-
Under Debug and Release Schemes:
-
Select the Any iOS Simulator SDK option.
- Remove the $(inherited) flag.
- Select the flags that prevent the build for the simulator (e.g., -framework) and click the "-" button to remove them.
-
Alternative Manual Adjustment:
-
Right-click on the
.xcodeprojfile in your project directory and select Show Package Contents. - Open the
.pbxprojfile with Xcode. - Search for the OTHER_LDFLAGS section in the project files and make the necessary adjustments directly.
NOTE: The OTHER_LDFLAGS section that needs to be modified should look like this:
A visual representation of the changes to be made in Xcode is provided below.


Library Flags to be Removed¶
The flags of the following libraries need to be removed:
- MLKitCommon
- MLKitVision
- MLKitFaceDetection
- MLImage
- TensorFlowLiteC
- WebRTC
Minimum Requirement¶
The EnQualify SDK is compiled with version 16.0 of Xcode, which Apple currently considers the minimum level for standard deployment and publishing processes. When agreement is reached on the stability of versions, the Xcode version will also increase accordingly with minor updates.
EnQualify SDK has determined the minimum iOS support as 15.5 due to its dependencies and functionalities. This means it can work with projects that have a minimum iOS Deployment target of 15.5 and above.
The EnQualify SDK has a simulator build structure compatible with both intel (x86_64) and (arm64) architectures. Once the necessary settings are provided, it can build and run flawlessly with both architectures.
Note
EnQualify SDK cannot be used on the simulator because it requires camera usage in OCR, Face, and VideoCall streams; and NFC functionality in the NFC stream.
Configuration Settings for EnQualify SDK¶
Adding Near Field Communication (NFC) and SignIn Capabilities¶
To add Near Field Communication (NFC) support to your project, follow these steps:
Opening the Project in Xcode¶
- Open your project in Xcode.
- Click on your project name in the Project Navigator to access the project target settings.
-
Switch to the Signing & Capabilities tab:
-
Click the + Capability button in this tab.
Adding NFC Support to the Project¶
- Type "Near Field Communication" or "NFC" into the search bar that appears.
- Select the Near Field Communication Tag Reading capability from the list.
This action will add NFC support to your project.
If You Cannot See the NFC Option¶
If you cannot see the NFC option in Xcode, this may be due to missing configurations or your Xcode version. In this case:
-
Visit the Apple Developer Documentation:
-
Go to the Apple Developer website.
-
Search for NFC Documentation:
-
Look for information about NFC or Near Field Communication capabilities. This will guide you on how to enable and configure NFC in your project.
-
Manually Enable NFC:
-
If necessary, manually enable NFC in your application's Info.plist file and other required configurations by following the steps in the Apple Developer documentation.
Configuring the Info.plist File¶
In accordance with Apple's privacy policies, you need to add usage descriptions for camera, microphone, and NFC scanning features to your Info.plist file. These descriptions will be displayed to the user when the application requests access to these resources.
Camera Usage Description¶
To request access to the device’s camera, add the following key to your Info.plist file:
<key>NSCameraUsageDescription</key>
<string>Access to the camera is required to scan QR codes and perform real-time video processing.</string>
Edit the description to indicate why your application needs the camera.
Microphone Usage Description¶
To request access to the device’s microphone, add the following key to your Info.plist file:
<key>NSMicrophoneUsageDescription</key>
<string>Access to the microphone is required to record sound during video calls and interactions.</string>
Edit the description to indicate why your application needs the microphone.
NFC Scanning Usage Description¶
To request access to NFC features, add the following key to your Info.plist file:
<key>NFCReaderUsageDescription</key>
<string>We require access to NFC to scan NFC tags and interact seamlessly with NFC-enabled devices.</string>
Edit the description to indicate why your application needs NFC scanning.
Adding NFC TagReaderSession¶
To read a contactless NFC chip, you need to add the relevant content and value containing the ISO 7816 Standard to your Info.plist file.
<key>com.apple.developer.nfc.readersession.iso7816.select-identifiers</key>
<array>
<string>A0000002471001</string>
</array>
Adding These Entries in Xcode¶
- Open your project in Xcode.
- Open the Info.plist file from the Project Navigator.
- Right-click in an empty area of the list and select Add Row.
- Add the above-mentioned keys (NSCameraUsageDescription, NSMicrophoneUsageDescription, and NFCReaderUsageDescription) with the appropriate descriptions.
These descriptions are necessary to clearly convey to users why your application requests access to these resources.
Purpose of the .entitlements File After Adding NFC¶
When you add NFC capabilities to your project, Xcode automatically creates a .entitlements file. This file contains the necessary authorization settings for your application to utilize specific features such as NFC access, push notifications, and iCloud.
Function of the .entitlements File¶
The .entitlements file ensures that the application has the necessary permissions to access system resources. This file includes the authority to use NFC features provided by iOS.
The .entitlements file for NFC will contain an entry like this:
This entry specifies the formats that your application can use for NFC tag scanning.
What Happens If the .entitlements File Is Missing?¶
- If the .entitlements file is missing or misconfigured, the NFC functionality will not work as expected.
- The application may not be able to request NFC permissions, or the system may block NFC access; this could lead to errors or crash situations.
Manual Addition of the .entitlements File¶
If Xcode does not automatically create the .entitlements file or if you need to configure it manually, follow these steps:
-
Create a New .entitlements File:
-
Right-click on your Project Navigator in Xcode and select New File.
- Under Resource, select Property List.
- Name the file
YourProjectName.entitlements(for example, replace "YourProjectName" with your project's name).
-
Add NFC Requirement to the .entitlements File:
-
Open the newly created .entitlements file.
- Add the following entry to enable NFC functionality:
-
Link the .entitlements File to Your Project:
-
Select your project in the Project Navigator.
- Under Signing & Capabilities, make sure the NFC capability is added.
- If it’s not added, click the + Capability button and add the Near Field Communication Tag Reading capability.
-
In the Signing & Capabilities section, ensure that your .entitlements file is correctly selected under the Code Signing settings.
-
Build the Project:
After adding the .entitlements file to the project, when you rebuild the project, it will have the NFC reading capability.
SSL Certificate and Implementation¶
EnQualify SDK Security System¶
The EnQualify SDK features a two-step security system.
- First Step: An SSL certificate is used to provide protection against man-in-the-middle attacks.
- Second Step: A network communication method that is end-to-end encrypted using the Message Signature method, which will be detailed later in the document.
In its current system, the EnQualify SDK communicates with the validation platform to send the information obtained during authentication and receive calibration and configuration data required for the SDK.
It is also in communication with the Core SDK Signalling.
For both systems, it is possible to disable the SSL service if necessary.



You can use the following script in the terminal to convert the certificate. The first part in "_.enqualify.io.pem" represents the name of the current .pem certificate, while "enqura.der" indicates the name of the .der certificate to be created.
Certificate Converter¶
A macOS application that converts SSL certificates from PEM format to DER format.
Certificate Converter is a user-friendly macOS application that converts SSL certificates from PEM (Privacy-Enhanced Mail) format to DER (Distinguished Encoding Rules) format. The application features both automatic certificate downloading from websites and conversion of existing PEM files.
Dual Entry Method: The Certificate Converter application offers users two different methods to obtain certificates. This approach addresses different use cases and user needs.
- Method 1: Download from URL

- Method 2: File Selection

Output Settings
Users can predefine a name for the DER file to be created.

Export Process - File Saving Process
When the conversion process is complete, clicking the "🚀 Create DER File" button brings up the file saving window. In this window, the user selects the location where the DER file will be saved and can edit the previously defined file name one last time. When the "Save" button is pressed, the system converts PEM to DER format in the background and saves it to the selected location. Upon successful completion of the process, a confirmation message "✅ DER file created successfully" is displayed.
Adding the Certificate to Xcode¶
To add the created .der certificate to Xcode:
- Open your project in Xcode.
- Drag and drop the .der certificate file into your project navigator.
- In the pop-up dialog, ensure that the appropriate Targets are selected for the certificate to be included in the correct build configurations.
- Verify that the certificate is visible under Build Phases > Copy Bundle Resources for the selected targets.
Selecting the correct targets is important to ensure that the certificate is accessible at runtime for the desired modules.
SSL Certificate Verification Process¶
The EnQualify SDK accesses the SSL certificate used to communicate with the validation platform by searching across the entire project package. The certificate is accepted if it is valid for the domain and has not expired, and the process continues. However, if an invalid certificate is provided, you will see related errors like ResponseValidation in the Xcode logs.
Multiple Certificate Support¶
The EnQualify Core SDK is designed to work with multiple certificates. To add multiple SSL certificates, you can populate the relevant fields in the baseModel parameter of the setBaseModel() function accessed from the EnQualify modules, which will be detailed later. Currently, both base64string and file-based certificate support has been enabled.
- The name of the created certificate must match the name given in the setBaseModel function; otherwise, an error will occur.
- If you want to disable SSL pinning while accessing the signaling environment and backend environment, you can simply leave the relevant parameters empty.
Warning
Disabling SSL Pinning for customer applications that will be involved in live processes is strongly discouraged, as it will result in security vulnerabilities.
Using SSL Pinning with Public Key¶
The SDK supports SSL pinning with the public key hash, in addition to the certificate file (.der/.cer) and Base64 certificate. With this method, an update to the certificate is not required in the application as long as the server's key pair does not change.
Parameters¶
Two new parameters have been added to the BaseModel classes of all modules (BaseModelOCR, BaseModelNFC, BaseModelFace, BaseModelVideoCall, BaseModelUtility):
| Parameter | Description |
|---|---|
mapiCertificatePublicKeyList: [String]? | List of public key hashes to be pinned for the MAPI (REST API) server |
signallingCertificatePublicKeyList: [String]? | List of public key hashes to be pinned for the Signalling (video conferencing) server |
Hash Format¶
Each value is the SHA-256 hash in Base64 format of the certificate's public key (SubjectPublicKeyInfo, DER). This is the standard pin-sha256 format. Example:
You can generate the hash using the following command (replace api.ornek.com with your own server address):
openssl s_client -connect api.ornek.com:443 -servername api.ornek.com </dev/null 2>/dev/null \
| openssl x509 -pubkey -noout \
| openssl pkey -pubin -outform der \
| openssl dgst -sha256 -binary \
| openssl enc -base64
For other certificates in the chain (intermediate/root), you can add -showcerts to the s_client command and process the relevant certificate through the same steps.
Usage Example¶
let baseModel = BaseModelOCR(
signallingCertificatePublicKeyList: [
"SIGNALLING_PRIMARY_HASH=",
"SIGNALLING_BACKUP_HASH="
],
mapiCertificatePublicKeyList: [
"MAPI_PRIMARY_HASH=",
"MAPI_BACKUP_HASH="
],
baseURL: "https://api.ornek.com",
locale: "tr",
mobileUser: "mobile",
countryCode: "TUR"
)
EnQualifyOCR.setBaseModel(with: baseModel, delegate: self)
The same parameters are used in the same names in other modules.
Working Logic¶
- Priority order: Public key list > DER certificate list (
...CertificateList) > Base64 certificate list (...CertificateBase64List). If the public key list is filled, the other two methods are disregarded. - Match: If the public key hash of any certificate in the server's certificate chain matches one of the values in the list, the connection is accepted.
- If no match: The connection is canceled, and the delegate's
initializeFailed(with:)method is called withInitializationError.invalidPinning(code 400). - If the list is empty or nil: No pinning is done, the standard iOS certificate validation is applied.
- The pinning setting is applied to the session on the first request. Instead of modifying the list while the application is running, restart the SDK with a new BaseModel.
Important Notes¶
- Key type: Only RSA 4096-bit public keys are supported in this version. You can check the key type of the certificate you will pin using the following command:
openssl x509 -in cert.pem -noout -text | grep "Public-Key". The result must be(4096 bit). - Backup hash: To avoid access interruptions during certificate/key renewals, we recommend adding at least one backup hash to the list (for example, the hash of the key to be used after renewal or the hash of the 4096-bit root certificate).
- Enter hash values completely, including the
=at the end.
Message Signature¶
The EnQualify SDK uses a secure end-to-end encrypted structure to transmit the information it has obtained to the verification platform. The EnQualify SDK generates a temporary RSA key and uses this RSA key to encrypt the public key of the RSA key generated on the backend. Then, the public key of the RSA key from the backend is returned to the EnQualify SDK in an encrypted form. The EnQualify SDK decrypts this public key. It signs the requests it will send to the Verification Platform with this key. The EnQualify SDK does not contain any fixed keys. This RSA key is regenerated for each session and transmitted to the EnQualify SDK in an encrypted form.
Models¶
BaseModel¶
BaseModel is the data model containing the certificate information and the server connection address used in validation processes. Signaling (Communication) and MAPI (Mobile-Application Programming Interface) certificates are stored both in file (.der) format and in Base64 text format.
Model¶
@objc public class CoreBaseModel: NSObject {
public var signallingCertificateList: [String]?
public var mapiCertificateList: [String]?
public var signallingCertificateBase64List: [String]?
public var mapiCertificateBase64List: [String]?
public var signallingCertificatePublicKeyList: [String]?
public var mapiCertificatePublicKeyList: [String]?
public var baseURL: String?
public var locale: String?
public var mobileUser: String?
public var countryCode: String?
public var useEmbeddedLocalSound: NSNumber?
}
Properties¶
| Property | Type | Description |
|---|---|---|
signallingCertificateList | [String]? | Array of signaling certificates. Certificates are stored in file format (.der). |
mapiCertificateList | [String]? | Array of MAPI certificates. Certificates are stored in file format (.der). |
signallingCertificateBase64List | [String]? | Encoded forms of signaling certificates in Base64String format. |
mapiCertificateBase64List | [String]? | Encoded forms of MAPI certificates in Base64String format. |
signallingCertificatePublicKeyList | [String]? | List of public keys for signaling certificates. |
mapiCertificatePublicKeyList | [String]? | List of public keys for MAPI certificates. |
*baseURL | String | Base server address used for API access. |
locale | String? | Determines the language of the voice guidance messages. |
mobileUser | String? | Represents the anonymous user information used when providing authorization. |
countryCode | String? | Used to ensure that the necessary data is obtained regionally when validation is done by country or region. |
useEmbeddedLocalSound | NSNumber? | Guarantees that embedded sound files in the project are preferentially used. |
Usage Example¶
In the following example, the BaseModel object is created, and the certificate information and server address are defined:
let baseModel = CoreBaseModel(
signallingCertificateList: ["enqura"],
mapiCertificateList: ["enqura"],
mapiCertificateBase64List: nil, // Base64String can be added
signallingCertificateBase64List: nil, // Base64String can be added
signallingCertificatePublicKeyList: nil,
mapiCertificatePublicKeyList: nil,
baseURL: "https://yourcompanymapi.enqura.com",
locale: "tr",
mobileUser: "mobile",
countryCode: "TUR",
useEmbeddedLocalSound: 1 // Use sounds embedded in the project
)
Sound Files Management¶
The SDK comes by default with embedded sound files.
Each sound file has a hash value that is used to check whether the sound file is up to date.
useEmbeddedLocalSound Parameter¶
The useEmbeddedLocalSound parameter found in the BaseModel determines the source from which the SDK will use sound files.
useEmbeddedLocalSound = false¶
In this case, the SDK checks for remote updates.
When the SDK is initialized:
- The SDK sends the hash list of the sound files located on the device to the BackOffice service.
- The BackOffice checks the existing hash values to determine whether a current sound file exists.
-
If an updated sound file exists:
-
The relevant sound file is downloaded from the server.
- The old sound file on the device is automatically updated.
This way, sound files can be managed remotely without needing an application update.
useEmbeddedLocalSound = true¶
In this case, the SDK does not make any requests to the remote server and only uses the sound files that come embedded within the application.
No update or download operations will be performed.
Local Override (Using Custom Sounds)¶
If the application developer wants to replace the default sounds that come with the SDK with their own sound files, they can override them by adding the relevant sound files to the application bundle.
For this, sound files with exactly the same names specified in the below list need to be added to the application bundle.
The SDK automatically detects these files and uses the sounds from the bundle instead of the default sounds.
- snd_start_eye_close
- snd_end_eye_close
- snd_start_face
- snd_liveness_timeout
- snd_start_face_left
- snd_face_fail
- snd_start_face_right
- snd_start_face_up
- snd_end_liveness
- snd_end_chip
- snd_start_chip_front
- snd_detect_chip
- snd_chip_timeout
- snd_chip_fail
- snd_start_smile
- snd_end_smile
- snd_id_read_timeout
- snd_id_type_check_timeout
- snd_start_id_back
- snd_cross_check_fail
- snd_end_id_read
- snd_start_holo
- snd_start_id_front
- snd_end_id_front
- snd_start_type_check_front
- snd_start_type_check_back
- snd_liveness_completed
- snd_waiting_agent
- snd_ready_to_start_id
- snd_ready_to_start_chip
SessionModel¶
SessionModel is the data model containing user and identity information during a call session. It includes the call type, user details, identity information, and additional parameters related to the session.
Model Definition¶
@objc public class CoresSessionModel {
var callType: String // Required field
var name: String? = nil
var surname: String? = nil
var phone: String? = nil
var email: String? = nil
var identityType: String? = nil
var identityNo: String? = nil
var reference: String // Required field
var canAutoClose: NSNumber?
var _continue: NSNumber?
var category: String? = nil
var taxNumber: String? = nil
var businessReference: String? = nil
var handicapped: NSNumber?
}
Features¶
| Feature | Type | Description |
|---|---|---|
*callType | String | Required. Parameter indicating the type of call (e.g., "NewCustomer"). |
userName | String? | The user's first name. Can be empty. |
surname | String? | The user's last name. Can be empty. |
phone | String? | The user's phone number. Can be empty. |
email | String? | The user's email address. Can be empty. |
identityType | String? | Identity type (e.g., "I"(Turkish ID Card), "P"(Passport)). Can be empty. |
identityNo | String? | The user's identity number. Can be empty. |
*reference | String | Required. Reference ID for the session. |
canAutoClose | NSNumber? | Determines whether the session can auto-close. Can pass 0/1. |
_continue | NSNumber? | Determines whether the session will continue. Can pass 0/1. |
category | String? | The category to which the session belongs. Can be empty. |
taxNumber | String? | The user's tax number. Can be empty. |
businessReference | String? | Reference information related to the business. Can be empty. |
handicapped | NSNumber? | A flag indicating whether the user is disabled. Can pass 0/1. |
Usage Example¶
In the following example, a SessionModel object is created to define session information:
var session = CoreSessionModel(
callType = "NewCustomer",
name = "Enqura",
surname = "Information",
phone = "+905551234567",
email = "enqualifyplus@enqura.com",
identityType = "Turkish ID Card",
identityNo = "12345678901",
reference = "REF123456",
canAutoClose = 1,
_continue = 1,
category = "category",
taxNumber = "9876543210",
businessReference = "COMPANY",
handicapped = 0
)
Customization of UI Components¶
Working Logic¶
UI parameters defined via the back office are retrieved through the API either when the application is launched or when the relevant flow is initiated.
These parameters are parsed into the VerifyMobileFlexibleLayoutModel structure, and the interface components are updated dynamically.
For example:
- The
fontColorfield → Changes the text colors. - The
ocrFrameFrontSuccessImageandocrFrameBackSuccessImagefields → Determine the images to be shown for successful cases for the front and back face. faceProgressLayerColor→ Controls the color of the progress circle during the face recognition process.faceFailImage→ Defines the custom image to be shown when recognition fails.
| Category | Description | Parameters |
|---|---|---|
| OCR Images | Defines the images used for frames, validity, failure, success, and guidance based on front and rear face separation in verification screens. | ocrFrameBackValidImage, ocrFrameBackInvalidImage, ocrFrameDefaultBackImage, ocrFrameFrontDefaultImage, ocrFrameBackDefaultImage, ocrFrameFrontFailImage, ocrFrameBackFailImage, ocrFrameDefaultFrontFailImage, ocrFrameDefaultBackFailImage, ocrFrameFrontValidImage, ocrFrameFrontInvalidImage, ocrFrameRotateImage, ocrFrameFrontSuccessImage, ocrFrameBackSuccessImage, ocrFrameFrontDefaultSuccessImage, ocrFrameBackDefaultSuccessImage |
| Face Recognition Images | Guidance and status images used in face verification steps. | faceLeftImage, faceRightImage, faceUpImage, faceComplatedImage, faceFailImage |
| Face Recognition Progress Layer | Customizes the appearance of the circular progress layer during face recognition. | faceProgressLayerColor, faceProgressLayerStroke |
| OCR and Face Visual Settings | Defines settings for color, opacity, guiding text, and text position for OCR and face layers. | ocrOverlayColor, ocrOverlayOpacityPercent, ocrShowDirectionText, ocrTextPosition, faceOverlayOpacityPercent, faceShowDirectionText, faceTextPosition, faceOverlayColor |
| Font | Determines the font, color, and size used in the interface. | font, fontColor, fontSize |
| Video View | Sets the position, size, mode, and overlay settings for small and large video areas in video calls. | smallVideoPosition, smallVideoSize, swapVideo, largeVideoMode, largeVideoOverlayColor, largeVideoOverlayOpacity |
| Agent and Progress Settings | Specifies the visibility and position of the agent's name and the color and opacity of other progress layers. | showAgentName, agentNamePosition, otherProgressLayerColor, otherOverlayOpacity |
| VideoCall Controls | Determines the visibility of video call controls and the icons to be used. | videoCallRotateButtonVisible, videoCallHangupButtonVisible, videoFlashButtonVisible, videoCallRotateButtonIcon, videoCallHangupButtonIcon, videoCallFlashButtonIcon, videoCallFlashCloseButtonIcon |
| Animation | Specifies the visual or resource value to be used for hologram animation. | hologramAnimation |