Quick start
Installation
Swift Package Manager
- Add
https://github.com/MicroblinkPlatform/microblink-platform-ios.gitas a package dependency. - Select Exact Version and add the latest released version.
Integration
Here's an example UIKit integration.
Create a MicroblinkPlatformSDK instance with your configuration, then present the view controller it returns.
Verification results come back through MicroblinkPlatformSDKDelegate.
import MicroblinkPlatform
import UIKit
let serviceSettings = MicroblinkPlatformServiceSettings(
workflowId: "ID of the workflow to use",
url: "URL of your proxy service",
consent: MicroblinkPlatformConsent(
userId: unique_user-ID,
isProcessingStoringAllowed: true,
isTrainingAllowed: true,
isGivenOn: .now
)
)
let sdk = MicroblinkPlatformSDK(
serviceSettings: serviceSettings,
delegate: self
)
present(sdk.startSDK(), animated: true)
Implement MicroblinkPlatformSDKDelegate to receive results:
func microblinkPlatformSDKDidFinish(
viewController: UIViewController,
result: MicroblinkPlatformResult
) {
print("Transaction ID:", result.transactionId)
print("Transaction status:", result.status)
viewController.dismiss(animated: true)
}
func microblinkPlatformSDKDidClose(
viewController: UIViewController,
cancelState: MicroblinkPlatformCancelState
) {
print("User exited:", cancelState.cancelReason)
viewController.dismiss(animated: true)
}
For more information and sample apps, see our iOS Github repository.