# Identance iOS Integration

# Requirements

  • iOS 10.0+
  • Xcode 10.2+
  • Swift 5.0+
  • iPhone idiom (iPad minimum support)
  • iPhone 5+
  • Git LFS

# Installation

# CocoaPods

# Git-lfs

brew install git-lfs
git lfs install
  • Be sure to restart your console after installing Git LFS
  • Note: if you already did try adding SDK using cocoapods and it's not working, first install the git-lfs and then clear you cocoapods cache. This should be sufficient to force cocoapods to clone SDK, if it still doesn't work, try deinitializing your pods and installing them again.

CocoaPods is a dependency manager for Cocoa projects. For usage and installation instructions, visit their website. To integrate Identance into your Xcode project using CocoaPods, specify it in your Podfile:

pod 'Identance', :git => 'https://github.com/....', :tag => "....."

IMPORTANT: if you need to integrate Identance SDK into Objective-C code then you should use ZN prefix for Identance classes.

# Usage

Open ExampleIdentance project with integrated SDK in Xcode. You need to execute the pod install command in the project dir to download the dependencies.

# Start the verification process

# Creating the Verification object

You access the main SDK features via the Verification object. To create it you need to first make the Configuration instance and setup its options:

# Configuration options:
  • userID (required) - identifier of a user. Must be the same as in the JWT token
  • blinkIDLicenceKey (required) - MicroBlink service licence key. Contact our manager to receive it.
  • environment (required) - Environment to work with. Use Environment.makeEnvironment(.production)
  • tokenProvider (required) - JWT Token provider instance. You need to implement the TokenProvider protocol to return the JWT Token string. You can use the existing class ClosureTokenProvider and setup the provider closure there or make a new one. See Working with JsonWebToken for technical details.
# Verification object creating:
let configuration = Configuration()
configuration.userID = "user_id"
configuration.blinkIDLicenceKey = "set_licence_here"
configuration.environment = Environment(type: .production)
configuration.tokenProvider = ClosureTokenProvider() { completion in
		completion("JWT Token", nil)

let verification try = Verification(configuration: configuration)

Then you need to get the VerificationViewController object, setup its delegate and present it.

let verificationController = verification.verificationViewController()
verificationController.delegate = self
present(verificationController, animated: true, completion: nil)

By implementing the VerificationViewControllerDelegate you will get callbacks from the verification process about its success or failure.

// Verification successfully finished
func verification(didComplete viewController: VerificationViewController) {
    viewController.dismiss(animated: true, completion: nil)

// Verification finished with some error
func verification(_ viewController: VerificationViewController, failed error: Error) {
    viewController.dismiss(animated: true, completion: nil)
    // Handle error here

# Get a status update on a user's verification

You could get the status of a user's verification by calling getVerificationStatus of Verification instance:

func getVerificationStatus(completion: ((VerificationStatus, Swift.Error?) -> Void)?)
# VerificationStatus:
  • notDetermined - the user data is absent
  • notVerified - the user verification is in progress or finished/stopped at some point. Please check the verifiedStages property of the Verification object for additional details
  • rejected - the user dossier is rejected
  • unsupportedChannel - N/A

# Customization

# Colors

You could customize the color pallete via the UIScheme singleton object.

If you need to customize a few colors then just call the configure(scheme:..) method:

UIScheme.shared.configure(scheme: [.errorColor: UIColor.red])
UIScheme.shared.configure(scheme: [.actionColorColor: UIColor.blue])

If you need to customize all of them then you can create a separate .plist file with the color list and load it via the configure(dictionary:..) method:

guard let filePath = Bundle.main.path(forResource: "custom-color-pallete", ofType: "plist"),
    let schemeDictionary = NSDictionary(contentsOfFile: filePath) as? [String: String]
else { return }

UIScheme.shared.configure(dictionary: schemeDictionary)

Please note that there is one special color key - preferredStatusBarStyle. It controls the status bar style. Value must be one of the following strings: default or lightContent