Ver-ID SDK Identity
Framework that provides a client identity to Ver-ID SDK 1.11.0 and newer
Installation
- Download CocoaPods
Add the Ver-ID-SDK-Identity pod to your Podfile:
pod 'Ver-ID-SDK-Identity', '~> 1.0'
- In Terminal enter
pod install
and press enter.
- In Terminal enter
Obtaining credentials Ver-ID SDK credentials
- Register your app. You will need your app’s bundle identifier.
- 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.
- 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
- Copy the Ver-ID identity.p12 file in your Xcode project and include it in your app’s target.
Place your password in your app’s Info.plist:
<key>com.appliedrec.verid.password</key> <string>your password goes here</string>
Create an instance of VerIDSDKIdentity:
import VerIDSDKIdentity do { let identity = try VerIDSDKIdentity(url: nil, password: nil) } catch { }
Option 2
- Copy the Ver-ID identity.p12 file in your Xcode project and include it in your app’s target.
Create an instance of VerIDSDKIdentity:
import VerIDSDKIdentity do { let identity = try VerIDSDKIdentity(password: "your password goes here") } catch { }
Option 3
- Upload the Ver-ID identity.p12 online or store it in your app.
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
- Upload the Ver-ID identity.p12 online or store it in your app.
Place your password in your app’s Info.plist:
<key>com.appliedrec.verid.password</key> <string>your password goes here</string>
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
- Create your own instance of SecIdentity.
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 {
}