iDenfy identity verification flow
Below you can check a full regular flow.This flow can be customized and success results can be omitted as well. We recommend omitting them using the immediate redirect feature.

Getting started
The SDK requires a verification token to start initialization. See the verification token generation guide.
Swift Package Manager
1. Add a packageYou can add it to your project with the following package repositories. You need to choose only one SDK option.Base iDenfySDK dependency:

- iDenfySDK - https://github.com/idenfy/iDenfySDK-spm.git
- iDenfySDK/iDenfyLiveness - https://github.com/idenfy/iDenfyLiveness-spm.git
- iDenfySDK/iDenfyBlurGlareDetection - https://github.com/idenfy/iDenfyBlurGlareDetection-spm.git
- iDenfySDK/iDenfyNFCReading - https://github.com/idenfy/iDenfyNFCReading-spm.git
- iDenfySDK/iDenfyRecognition - https://github.com/idenfy/iDenfyRecognition-spm.git


To use the localized version of the liveness feature, add FaceTec.strings to your app module. Otherwise, the localization will not work.
iDenfy Assets can be found at the following URL.
Strings are located in ../IdenfyAssets/IdenfyStrings folder.
CocoaPods
1. Add dependencyAdd the following line to your Podfile with the latest version. The latest version is accessible from the changelog.Base iDenfySDK dependency:iDenfySDK with Advanced Liveness detection feature:iDenfySDK with Advanced Liveness detection and Document blur glare detection features:iDenfySDK with Advanced Liveness detection, Document blur glare detection and NFC Reading features:iDenfySDK with Advanced Liveness detection, Document blur glare detection, NFC Reading and Document Auto Capture features:2. Update podsRun
If you are not overriding any custom views or applying customization, you can use the dynamic version. If you did make layout changes, do not use the dynamic version, since runtime crashes can occur.
pod install to install iDenfySDK or pod update to update the current iDenfySDK. Manual
1. Download iDenfySDKDownload the latest iDenfySDK build.2. Include required modulesCopy all frameworks from the IdenfyLiveness folder into your app target folder.3. Embed & SignEmbed and sign the included frameworks.
4. Include internal dependenciesiDenfySDK uses several internal dependencies. Your project should also include those dependencies using CocoaPods or any other preferred method.
To use the localized version of the liveness feature, add FaceTec.strings to your app module. Otherwise, the localization will not work.
Strings are located in ../iDenfySDK/IdenfyAssets/IdenfyStrings.

If your application uses Objective-C bridging headers you might face the following compile error:
using bridging headers with module interfaces is unsupported. Command CompileSwiftSources failed with a nonzero exit code.
post_install do |installer|
installer.pods_project.targets.each do |target|
if target.name == "lottie-ios"
target.build_configurations.each do |config|
config.build_settings['BUILD_LIBRARY_FOR_DISTRIBUTION'] = 'YES'
end
end
end
end
If your application has bitcode disabled and your build fails due to enabled bitcode on any of the pods, use:
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['ENABLE_BITCODE'] = 'NO'
end
end
end
To initialize the SDK in a SwiftUI project, create a
UIViewControllerRepresentable and present it in your view:struct iDenfySDKUIViewController: UIViewControllerRepresentable {
let authToken: String
init(_ token: String) {
self.authToken = token
}
func makeUIViewController(context: Context) -> IdenfySDKNavigationController {
return initializeIdenfySDKDefault(authToken: authToken)
}
func updateUIViewController(_ viewController: IdenfySDKNavigationController, context: Context) {
//update Content
}
private func initializeIdenfySDKDefault(authToken: String) -> IdenfySDKNavigationController {
let idenfyUISettingsV2 = IdenfyUIBuilderV2()
.build()
let idenfySettingsV2 = IdenfyBuilderV2()
.withAuthToken(authToken)
.withUISettingsV2(idenfyUISettingsV2)
.build()
let idenfyController = IdenfyController.shared
idenfyController.initializeIdenfySDKV2WithManual(idenfySettingsV2: idenfySettingsV2)
handleSDKResults(idenfyController)
return idenfyController.instantiateNavigationController()
}
}
Full initialization code of iDenfySDK using SwiftUI is available in the sample application.
If your service uses only the automatic (default) callback, then you should only check
idenfyIdentificationResult.autoIdentificationStatus. /// Returns user's verification result in the UIViewController dismiss completion webhook.
private func handleSDKResults(_ idenfyController: IdenfyController) {
idenfyController.getIdenfyResultWithDismiss(idenfyIdentificationResult: {
idenfyIdentificationResult
in
print("Auto: \(idenfyIdentificationResult.autoIdentificationStatus.rawValue), Manual: \(idenfyIdentificationResult.manualIdentificationStatus.rawValue)")
switch idenfyIdentificationResult.autoIdentificationStatus {
case .APPROVED:
// The user completed an identification flow and the identification status, provided by an automated platform, is APPROVED.
break
case .FAILED:
// The user completed an identification flow and the identification status, provided by an automated platform, is FAILED.
break
case .UNVERIFIED:
// The user did not complete an identification flow and the identification status, provided by an automated platform, is UNVERIFIED.
break
@unknown default:
break
}
switch idenfyIdentificationResult.manualIdentificationStatus {
case .APPROVED:
// The user completed an identification flow and was verified manually while waiting for the manual verification results in the iDenfy SDK. The identification status, provided by a manual review, is APPROVED.
break
case .FAILED:
// The user completed an identification flow and was verified manually while waiting for the manual verification results in the iDenfy SDK. The identification status, provided by a manual review, is FAILED.
break
case .WAITING:
// The user completed an identification flow and started waiting for the manual verification results in the iDenfy SDK. Then he/she decided to stop waiting and pressed a "BACK TO ACCOUNT" button. The manual identification review is still ongoing.
break
case .INACTIVE:
// The user was only verified by an automated platform, not by a manual reviewer. The identification performed by the user can still be verified by the manual review if your system uses the manual verification service.
break
@unknown default:
break
}
})
}
Callback status reference
autoIdentificationStatus
| Name | Description |
|---|---|
APPROVED | The user completed a verification flow and the verification status, provided by an automated platform, is APPROVED. |
FAILED | The user completed a verification flow and the verification status, provided by an automated platform, is FAILED. |
UNVERIFIED | The user did not complete a verification flow and the verification status, provided by an automated platform, is UNVERIFIED. |
manualIdentificationStatus
| Name | Description |
|---|---|
APPROVED | The user completed a verification flow and was verified manually while waiting for the manual verification results in the iDenfy SDK. The verification status, provided by a manual review, is APPROVED. |
FAILED | The user completed a verification flow and was verified manually while waiting for the manual verification results in the iDenfy SDK. The verification status, provided by a manual review, is FAILED. |
WAITING | The user completed a verification flow and started waiting for the manual verification results in the iDenfy SDK. Then he/she decided to stop waiting and pressed a “BACK TO ACCOUNT” button. The manual verification review is still ongoing. |
INACTIVE | The user was only verified by an automated platform, not by a manual reviewer. The verification performed by the user can still be verified by the manual review if your system uses the manual verification service. |
These SDK statuses are the same as iFrame integration statuses. The only difference is that the SDK returns INACTIVE if the manual verification screen was not opened during the verification session, instead of returning null as the iFrame does.
Also, the iFrame does not close automatically since it can deliver results without closing itself.
After the SDK finishes and closes itself, you will also receive a webhook callback to your backend system.It might be useful to completely ignore the SDK status and communicate between your app and your backend service about verification status.
Samples
Our UIKit sample and SwiftUI sample applications demonstrate the integration of the iDenfy SDK.FAQ
1. Is there a possibility to change the verification results view? Yes, you can achieve this by providing a custom waiting view controller. 2. How to change the position of the top titles? Any component and its properties can be changed by supplying your implementation of UIView. 3. How do I report an issue within the SDK? Please report any issue via the Jira customer portal. Attach the SDK and Xcode versions you are using, and describe the problem in as much detail as possible. 4. When I override liveness fonts, the size does not change. Why is that? Liveness font size is dynamically determined according to the screen resolution, and it cannot be manually changed. 5. What if Apple Review team denies our application because of iDenfy SDK?- Check the iDenfy privacy policy for possible answers.
- If Apple Review team asks for a demo of NFC functionality, provide the following video.
