Cocoapods platforms Cocoapods CI

Ver-ID SDK Identity

Framework that provides a client identity to Ver-ID SDK 1.11.0 and newer

Installation

  1. Download CocoaPods
  2. Add the Ver-ID-SDK-Identity pod to your Podfile:

    pod 'Ver-ID-SDK-Identity', '~> 1.0'
    
    1. In Terminal enter pod install and press enter.

Obtaining credentials Ver-ID SDK credentials

  1. Register your app. You will need your app’s bundle identifier.
  2. Registering your app will generate an evaluation licence for your app. The licence is valid for 30 days. If you need a production licence please contact Applied Recognition.
  3. When you finish the registration you’ll receive a file called Ver-ID identity.p12 and a password.

Creating a Ver-ID SDK identity

Option 1

  1. Copy the Ver-ID identity.p12 file in your Xcode project and include it in your app’s target.
  2. Place your password in your app’s Info.plist:

    <key>com.appliedrec.verid.password</key>
    <string>your password goes here</string>
    
  3. Create an instance of VerIDSDKIdentity:

    import VerIDSDKIdentity
    
    do {
        let identity = try VerIDSDKIdentity(url: nil, password: nil)
    } catch {
    }
    

Option 2

  1. Copy the Ver-ID identity.p12 file in your Xcode project and include it in your app’s target.
  2. Create an instance of VerIDSDKIdentity:

    import VerIDSDKIdentity
    
    do {
        let identity = try VerIDSDKIdentity(password: "your password goes here")
    } catch {
    }
    

Option 3

  1. Upload the Ver-ID identity.p12 online or store it in your app.
  2. Create an instance of VerIDSDKIdentity referencing the URL of the Ver-ID identity.p12 file:

    import VerIDSDKIdentity
    
    do {
        guard let url = URL(string: "https://ver-id.s3.us-east-1.amazonaws.com/ios/com.appliedrec.verid.licenceclient/test_assets/Ver-ID%20identity.p12") else {
            return
        }
        let identity = try VerIDSDKIdentity(url: url, password: "your password goes here")
    } catch {
    }
    

Option 4

  1. Upload the Ver-ID identity.p12 online or store it in your app.
  2. Place your password in your app’s Info.plist:

    <key>com.appliedrec.verid.password</key>
    <string>your password goes here</string>
    
  3. Create an instance of VerIDSDKIdentity referencing the URL of the Ver-ID identity.p12 file:

    import VerIDSDKIdentity
    
    do {
        guard let url = URL(string: "https://ver-id.s3.us-east-1.amazonaws.com/ios/com.appliedrec.verid.licenceclient/test_assets/Ver-ID%20identity.p12") else {
            return
        }
        let identity = try VerIDSDKIdentity(url: url)
    } catch {
    }
    

Option 5

  1. Create your own instance of SecIdentity.
  2. Pass the identity to the VerIDSDKIdentity initializer:

    import Security
    import VerIDSDKIdentity
    
    lazy var secIdentity: SecIdentity = {
        // Construct your SecIdentity instance
        let identity: SecIdentity // Stub
        return identity
    }()
    
    do {
        let identity = try VerIDSDKIdentity(identity: self.secIdentity)
    } catch {
    }
    

Providing your identity to Ver-ID SDK 1.11.0 and newer

Create an instance of VerIDSDKIdentity and pass it to VerIDFactory:

import VerIDSDKIdentity
import VerIDCore

do {
    // See above
    let identity = try VerIDSDKIdentity()
    // Construct VerIDFactory with your identity
    let veridFactory = VerIDFactory(identity: identity)
    // ... use veridFactory to create an instance of VerID
} catch {
}

Reference documentation