Adding the dependency
- Android
- iOS
In the build.gradle file of the Gradle module where you want to declare the dependency on AutomatID (typically at path app/build.gradle
), be sure to define the following repositories:
repositories {
mavenCentral()
maven {
url = "https://automatid-artifacts.s3.amazonaws.com/maven/"
}
}
Then, add the dependency on AutomatID:
implementation("com.automatid:automatid:<VERSION>")
You can find the latest version number and the changelog in the Changelog page.
In case your app uses R8, Proguard or DexGuard for code obfuscation and/or optimization, AutomatID automatically provides a configuration file to ensure its correct behavior at runtime. No further actions are required. AutomatID is fully compatible with R8 running in full mode.
Your project's Podfile should look like the following:
source 'https://github.com/automatid/automatid_specs.git'
source 'https://cdn.cocoapods.org/'
install! 'cocoapods', :deterministic_uuids => false
use_frameworks!
platform :ios, '12.0'
target 'AutomatID_Example' do
pod 'AutomatID', '<VERSION>' # TODO: insert the version here
end
post_install do |installer|
installer.generated_projects.each do |project|
project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '12.0'
config.build_settings["DEVELOPMENT_TEAM"] = "<YOUR TEAM ID HERE>" # TODO: Provide your team ID here
end
end
end
end
You can find the latest version number and the changelog in the Changelog page.
To read the document, AutomatID needs to access the device camera and NFC.
In the "Signing & Capabilities" tab of the project, be sure to add "Near Field Communication Tag Reading".
Next, add the permission texts for camera and NFC in your project's info.plist file, you need to add the two rows with value type String and the message for the user as the value. Inside Xcode it should look like the following screenshot:
It is also required to add the identifiers for NFC Tag reader session, which should look as follows:
Please refer to the following xml representation of the plist file for the correct key to add to the plist (NFCReaderUsageDescription
and NSCameraUsageDescription
). Also consider that if you have already defined them because your app also accesses the camera and/or the NFC, please be sure to modify them to include the purposes stated below to your app usage descriptions:
<key>NFCReaderUsageDescription</key>
<string>The NFC antenna is used to read the NFC chip available within the documents you want to use to perform an identification</string>
<key>NSCameraUsageDescription</key>
<string>The camera is only used to scan your identity document and perform the liveness check.</string>
<key>com.apple.developer.nfc.readersession.iso7816.select-identifiers</key>
<array>
<string>A0000002471001</string>
</array>