Skip to main content
Skip table of contents

iOS Quickstart Sample App

Get started by running the 4FingerID Sample App and review its code alongside the iOS integration guide. Code can be repurposed for your own application.

Sample App (VeridiumExportDemo)

The VeridiumExportDemo app demonstrates Veridium SDK integration and use of 4Fingers ID for fingerprint export. It is intended as a minimal functional example and demonstrates:

  • Licensing

  • SDK initialisation

  • Format selection

  • Fingerprint export with various configurations

  • Finger Selection

WARNING

If your licence is only valid for 4Fingers ID it will only function with the VeridiumExportDemo app, not any other Veridium sample app.

Please remove all previous versions of the sample apps before installing updated versions. These apps require a minimum of iOS 9.0 and Xcode 14.0.

This guide does not cover using the simulator due to use of hardware cameras.

Build and Run#

To build and run the VeridiumExportDemo app

  1. Download and extract the VeridiumSDK_iOS_[version].zip package as provided by your Veridium representative. The VeridiumExportDemo app is located at the root.

  2. Navigate to /VeridiumExportDemo/ and open VeridiumExportDemo.xcworkspace. Xcode will open and list VeridiumExportDemo in the project navigator. Expand it to reveal both Swift and Objective-C source files.

  3. Clean the project by menu selecting Product->Clean Build Folder and then build the app via Product->Build. This should successfully build the application.

  4. A licence string is required, provided by your Veridium representative. This is an online licence and requires the device to have internet access. Unzip the licence package and open sdk.lic with a text editor [Note: the file is UTF-8 plain text encoded]. Copy the whole licence string.

  5. In Xcode, open AppDelegate.m and AppDelegate.swift paste the licence string where indicated, retaining the quotes, for example:

    CODE
    NSString* license = @"Et3bLBrNT4feRrmER0P2AuMMDF"; // your licence will be ~1300 char
    CODE
    let licenseSDK = "Et3bLBrNT4feRrmER0P2AuMMDF"
  6. Your licence is tied to the app's Bundle identifier. Change the Bundle identifier in the General tab to that agreed with your Veridium salesperson. As supplied, the Bundle identifier is com.veridiumid.sample.export.

  7. Due to Apple's security policies, it is necessary to alter the signing configuration before the app will run. Switch to the Signing & Capabilities tab. Select the Team for signing. You may use automatic signing, or follow your organisation's recommendations for app signing.

  8. Connect an iOS device via USB and select it as the active device in the scheme. Uninstall previous versions of the app from the device and hit Run.

App Features:

Here we describe the Swift version of the app, but the Objective-C version is equivalent. It follows the typical structure of an iOS app; an AppDelegate.swift, a home screen storyboard Main.storyboard, and home screen view controller ViewController.swift.

The Veridium SDK is initialised asynchronously within AppDelegate via VeridiumSDK.setup(). Note where the 4F exporter object is registered for use:

CODE
VeridiumSDK.shared.register4FUIExporter()
VeridiumSDK.shared.registerLicenseLoader(VeridiumBiometricsFourFLicenseLoader())

The ViewController sets up buttons for various configurations using a VeridiumFourFCaptureConfig object and calls commonExport() to launch the Export operation:

CODE
@IBAction func onExport8F(_ sender: AnyObject) {
    exportConfig = VeridiumFourFCaptureConfig()
    exportConfig.setHand(.bothHands)
    exportConfig.targetIndexFinger = false
    exportConfig.targetLittleFinger = false
    commonExport()
}

VeridiumBiometricsFourFService.exportTemplate() is called with a complete callback to handle the result and writes the returned Data object to local storage.

A selection spinner is used for export format selection, see setupFormatSpinner().

The VeridiumFingerSelection project provides example UI for finger selection. The ViewController is extended to implement a ViewControllerFingerSelectorDelegate VeridiumFingerSelector is imported and ViewControllerFingerSelector.initiate() called to fetch the finger selector view controller for presentation:

CODE
if let individualFingerSelectorVC = ViewControllerFingerSelector.initiate() {
    individualFingerSelectorVC.modalPresentationStyle = .overCurrentContext
    individualFingerSelectorVC.exportConfig = exportConfig
    individualFingerSelectorVC.delegate = self
    individualFingerSelectorVC.presentInTopmost()
}

Access Saved Templates

Unlock your Apple device and connect it via USB to your Mac. The devices will mount in Finder under Locations. Select the device and go to the Files tab. Expand the drop down for VeridiumID and drag and drop template files to your Mac.

Troubleshooting

License Troubleshooting

  • The provided licence is for specific features. Ensure you are running the correct app, VeridiumExportDemo.

  • Ensure your licence string copied correctly without introducing new lines. Your text editor should open the the licence file as UTF-8.

  • Double check the Bundle identifier matches that indicated by your Veridium salesperson.

  • Ensure the device has internet access.

  • Uninstall the app, clean, build, and re-install.

  • In Xcode, open the output console and copy the whole contents and send to your Veridium salesperson.

  • Screenshot where you're entering your licence and send to your Veridium salesperson.

  • We are always happy to take a call to resolve sample app build issues.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.