async/await API (with callback-style overloads, and full Objective-C support).
Prerequisites. To read a card or capture a fingerprint, install the matching macOS desktop service first —
mbkyc-pcsc-service for card readers and the vendor service (e.g. mbkyc-suprema-service) for fingerprint. Without them, listSmartcardReaders() / listFingerprintReaders() return empty. See Install services on macOS and Supported devices. Manual-entry verification needs no services.Download the example
A self-contained CLI. Drop the XCFramework into
deps/, fill in the config block, and swift run.Install
The Swift SDK ships as a signed, notarized XCFramework — there is no Swift Package Manager or CocoaPods distribution. Download the framework from Nexus and link it into your Xcode project.Download the XCFramework
Fetch it from the raw repository (replace
repo.client.ae with your proxied host, and 0.5.0 with the current version):Initialize
TokenSignerDelegate whose sign(signingInput:completion:) routes the input to the holder of the secret (your backend), signs it, and returns the signature. See Authentication.
Register & validate
Register the device once, thenvalidate with the request for your flow:
Validation requests
Each request is aValidationRequest subclass. Pick the one for the document you’re verifying — see Validation methods for when to use each, and Install services on macOS for the hardware prerequisites.
- Emirates ID
- Passport
Manual entry — no hardware required.Card read — needs a smart card reader + + Fingerprint — pass a
mbkyc-pcsc-service.fingerprint: to either request above to add a biometric match (needs a fingerprint sensor + its service — see Biometrics).Full initializers (optional params:
dateOfBirth, issueDate, expiryDate, fingerprint, clientReferenceId):EmiratesIdManual(idNumber:documentNumber:nationality:dateOfBirth:issueDate:expiryDate:fingerprint:clientReferenceId:)EmiratesIdCard(readerId:cardDipTimeoutMs:fingerprint:clientReferenceId:)PassportManual(passportNumber:passportType:nationality:dateOfBirth:issueDate:expiryDate:clientReferenceId:)
(VerificationResult?, MBKYCError?) -> Void — for codebases that haven’t adopted async/await.Biometrics
Attach aFingerprint to an Emirates ID request (EmiratesIdCard or EmiratesIdManual) to also match a fingerprint. You supply a FingerRecommendationDelegate that picks which finger to capture when the SDK asks:
Requires a fingerprint sensor and its desktop service (e.g.
mbkyc-suprema-service). Get scanner.id from listFingerprintReaders().Error handling
All errors areMBKYCError: Error with a typed ErrorCode enum:
Objective-C
MBKYC can be used from any queue; hold it for the lifetime of your SDK use.Full API reference
async/await signatures below; each has a completion-handler overload of the form completion: @escaping (Value?, MBKYCError?) -> Void. Shared types are in Data types.
| Method | Signature |
|---|---|
| Create | static MBKYC.create(baseUrl:apiKeyId:tokenSigner:logConfig:httpTimeoutMs:extraHeaders:) throws -> MBKYC |
| List smart card readers | listSmartcardReaders() async throws -> [ReaderInfo] |
| List fingerprint readers | listFingerprintReaders() async throws -> [ReaderInfo] |
| Register device | registerDevice(name: String) async throws |
| Check registration | checkRegistration() async throws -> RegistrationStatus |
| Validate | validate(_ request: ValidationRequest) async throws -> VerificationResult |
| Export logs | exportLogs(to url: URL) async throws |
ValidationRequest subclasses — see Validation requests above):
Task. Errors are thrown as MBKYCError.
