Mob.ID SDK is a very flexible library for iOS.

With MOB.ID you handle your identity and privacy information swiftly, digitally and securely. We at MOB.ID share your convictions and principles. We are always there for you

MOB.ID is your passport to the world

In addition configuration options, MOB.ID provides NFC, Face Detection, Passpodr Scan and etc. But MOB.ID is also developed-friendly, which means you can fully and easily add it to your project:

  • Add SDK to existing project
  • Fill API keys
  • Install pods for SDK

Requirements

  • iOS 14.0+
  • Swift 5.0+

Installation

CocoaPods

Install using CocoaPods by adding this line to your Podfile:

pod 'MobID_SDK' , git: 'https://bitbucket.org/mob_id/mob.id_sdk.git'

Then, run the following command:

$ pod install

Manual

  1. In Xcode, add MobID_SDK.framework to your project.
  2. On your app’s target, add the MobID_SDK.framework
    • as an embedded binary on the General tab.

Integrate Pods extensions to Podfile

pod 'OpenSSL-Universal', '1.1.180'
pod 'GoogleMLKit/FaceDetection'

Usage

    import MobID_SDK

Configuration

MobIDSDK.run { config in
   config.organizationName = "organization_name"         // Name of organization
   config.subOrganizationName = "Sub_organization_name"  // Name of suborganization
   config.apiKey = "api_key"                             // Api key
   config.cerPassword = "cer_password"                   // Certificate password
} 

Modules

Optical Check

Scan document and recognize MRZ


var cameraView: MIDScannerView = MIDScannerView()  //View for use scanning

cameraView.delegate //Delegate of MIDScannerView

cameraView.startScan() //Start scan

cameraView.stopScan() //Stop scan

// Delegate needFlipDocument from scan result
func needFlipDocument(_ scanView: MIDScannerView, result scanResult: MobIDResult<Bool>) {
   switch scanResult {
      case .success:
            ...
      case .failure(let error):
            print(error.localizedDescription)
   }
}

// Delegate didScanCompleted from scan result
func didScanCompleted(_ scanView: MIDScannerView, result scanResult: MobIDResult<Bool>) {
    switch scanResult {
       case .success:
            ...
       case .failure(let error):
            print(error.localizedDescription)
    }
}

// Result of scan UIImage
MIDScanManager.getDocumentImages() -> [UIImage]

Electronic Check

Scan document and recognize NFC chip information


//Start scan nfc chip
MIDNFCReader.startScanNFC { result in
    switch result {
        case .success(let res):
            ...
        case .failure(let error):
            print(error.localizedDescription)
    }   
}

//Stop scan nfc chip
MIDNFCReader.stopScanNFC()

Liveness Check


var livenessView: MIDLivenessView = MIDLivenessView() //View for use liveness

livenessView.delegate //Delegate of MIDLivenessView

livenessView.startLivenessCheck() //Start Liveness

livenessView.stoptLivenessCheck() //Stop Liveness

livenessView.startVerification() //Start process of liveness verification

// Delegate method nextStep and progress from liveness
func livenessView(nextStep step: String, stepProgress progress: Float) {
    switch scanResult {
        case .success:
            ...
        case .failure(let error):
            print(error.localizedDescription)
    }
}

// Delegate method liveness finish
func livenessCheckFinished(_ finished: MobIDResult<Bool>) {
    switch scanResult {
        case .success:
            ...
        case .failure(let error):
            print(error.localizedDescription)
    }
}

Create Identity

Create rooot or derived identity

    //Create root identity
    MIDSDKManager.createIdentity { result in
        switch result {
        case .success(_):
            ...
        case .failure(let error):
            ...
        }
    }

    //Delete root identity
    MIDSDKManager.deleteRootIdentity()

    //Get root identity
    MIDSDKManager.getIdentity()

    //Create derived identity
    MIDSDKManager.createDerivedIdentity { result in
        switch result {
            case .success(_):
                ...
            case .failure(let error):
                ...
        }
    }

    //Get derived identity
    MIDSDKManager.getDerivedIdentity()

Get Scanning information

Get information from optical scan or nfc chip

    //Get document images
    MIDScanManager.getDocumentImages()

    //Get user photo from NFC chip
    MIDScanManager.getUserPhoto()

    //Get MRZ key - MRZ key from scan of user document. Use from scan nfc
    MIDScanManager.getMrzKey() -> String

    //Get document scan result
    MIDScanManager.getDocumentMrz() -> MIDScanResult

    //Get NFC chip data
    MIDScanManager.getChipData() -> ChipData