- Xcode 14.3 or later
- Deployment Target: iOS 11.0 or later (Note: NFC can work only with iPhone 7 or higher)
Download the latest version of the eID framework.
-
Add the
idnow_eid.framework
andAuthadaAuthenticationLibrary.xcframework
to your Xcode project files. NOTE:- Due to technical reasons, we cannot make the following library available on Github:
AuthadaAuthenticationLibrary.xcframework
. Please contact your customer success manager so that they can provide it to you.
- Due to technical reasons, we cannot make the following library available on Github:
-
Navigate to your project settings, select your build target and open
Build Phases
. -
Add the
idnow_eid.framework
,CoreNFC.framework
andAuthadaAuthenticationLibrary.xcframework
toLink Binary With Libraries
-
Make sure both
AuthadaAuthenticationLibrary
andidnow_eid
frameworks are added inEmbed Frameworks
section. -
Add
Near Field Communication Tag Reading
as a capability. In the entitlements file, check if there is an array for the keyNear Field Communication Tag Reader Session Format
, make sure the array contains the entryNFC tag-specific data protocol
. -
Update the
Info.plist
file:
Step 1: Import the library into your source code.
import idnow_eid
@import idnow_eid;
Step 2: Configure the apearance.
You can customize the SDK appearance by accessing the properties of the IDN_eIDAppearance class. The complete list of properties and possible values can be found here.
let eidAppearance = IDN_eIDAppearance.shared
eidAppearance.underlineButtonTitles = false
eidAppearance.fontNameBold = "TimesNewRomanPS-BoldMT"
eidAppearance.fontNameRegular = "TimesNewRomanPSMT"
eidAppearance.primaryBrandColor = .cyan
eidAppearance.proceedButtonBackgroundColor = .magenta
eidAppearance.linkColor = .systemBlue
IDN_eIDAppearance *appearance = IDN_eIDAppearance.shared;
appearance.primaryBrandColor = UIColor.cyanColor;
appearance.proceedButtonBackgroundColor = UIColor.magentaColor;
appearance.linkColor = UIColor.blueColor;
appearance.underlineButtonTitles = false;
appearance.fontNameRegular = @"TimesNewRomanPSMT";
appearance.fontNameBold = @"TimesNewRomanPS-BoldMT";
Step 3: Obtain the ident token and configure the IDnowController
same as for the regular VideoIdent flow. This is needed to properly instantiate the identification system. For details see the VideoIdent configuration.
Step 4: Once the initialization is finished, check for errors and proceed to the eID identification.
idnowController.initialize(completionBlock: {(success, error, canceledByUser) -> Void in
if error != nil {
// Handle the error
return
}
if canceledByUser {
// Handle cancellation
} else if success {
// Initialize the eID flow (See step 5). Note: This should be used instead of the regular VideIdent flow.
}
})
[self.idnowController initializeWithCompletionBlock:^(BOOL success, NSError *error, BOOL canceledByUser)
{
if (error)
{
// Handle the error
}
else if (success)
{
// Initialize the eID flow (See step 5). Note: This should be used instead of the regular VideIdent flow.
}
else if (cancelledByUser)
{
// Handle cancellation
}
}];
Step 5: Initialize the IDN_eIDRouter
that will be responsible for showing the VideoIdent/eID chooser page and the subsequent identification flow.
guard let token = textField.text, !token.isEmpty else {
// input token validate
return
}
eidRouter = IDN_eIDRouter(
withControlller: self,
token: token,
completion: { [unowned self] (support, error) in
if support {
self.eidRouter.present {
(identSuccess, continueVideoIdent, error) in
if continueVideoIdent {
print("LOG: - Continue video identification")
} else if let error = error {
print("LOG: - Failed \(error)")
} else {
print("LOG: - Identification \(identSuccess ? "Succeded" : "Failed")")
}
}
} else {
print("LOG: - Device not support nfc ")
}
})
self.eidRouter = [[IDN_eIDRouter alloc]
initWithControlller:self
token: token
completion:^(BOOL supported, NSError * error) {
if (supported) { // device supported, and can continue eID
[self.eidRouter present:^(BOOL success, BOOL
continueVideoIdent,
NSError * error) {
if (continueVideoIdent) { // Start video ident
NSLog(@"LOG: - Video identification");
}
else if (error) {
NSLog(@"LOG: - Error %@", error.localizedDescription);
} else {
NSLog(@"LOG: - Identification %s",
success ? "Succeded" : "Failed" );
}
}];
} else {
NSLog(@"LOG: - Device doesnot support");
}
}];
Swift | Objective C | Description |
---|---|---|
unsupportedNFC | IDN_eIDErrorUnsupportedNFC | The flow cannot be started because the device does not support NFC. |
userCancelled | IDN_eIDErrorUserCancelled | The user cancelled the identification process manually. |
invalidToken | IDN_eIDErrorInvalidToken | The supplied token is invalid. |
preconditionFailed | IDN_eIDErrorPreconditionFailed | Some of the preconditions weren't met. This includes: expired ident code, already used ident code, etc. |
tokenUnsupportElectronicCard | IDN_eIDErrorTokenUnsupportElectronicCard | The document used for the identification is unsupported. |
unknown | IDN_eIDErrorUnknown | The process has failed with an undefined error. |
All appearance settings are identical to the ones used in VI SDK.
Additionally, the Terms and Conditions checkbox visibility can be configured via IDN_eIDConfig
.
A flag that toggles the visibility of the Terms&Conditions checkbox. Default: true
Example usage:
IDN_eIDConfig.shared.enableTnC = false
An optional font name that can be used to replace the regular font used by the SDK.
Default: System regular Font
An optional font name that can be used to replace the bold font used by the SDK.
Default: System bold Font
An optional font name that can be used to replace the medium font used by the SDK.
Default: System medium Font
An optional font name that can be used to replace the light font used by the SDK.
Default: System light Font
Underline all button titles. Set this to true
in order to underline button text.
Default: false
Make button titles bold. Set this to false
in order to use normal font weight in button titles.
Default: true