Usage Overview
Import QoreID SDK
import QoreIDSDK
Launch QoreID SDK via QoreIDSdk Object
QoreIDSdk Object
To Launch the application, it's important to have your application embedded in a navigation controller. The SDK can be initiated within your view controller, and you'll need to provide the view controller as a parameter.
QoreIdSdk.shared.launch(param: param, vc: self) { result in
print(result)
}
Receiving Results from the SDK
The QoreID SDK returns result which is a QoreIDResult class as a closure, the result may either be an error or a success.
QoreIdSdk.shared.launch(param: param, vc: self) { [weak self] result in
self?.onQoreIdResultReceived(result: result)
}
func onQoreIdResultReceived(result: QoreIDResult?) {
if let result = result {
print("---> QoreIDResult:")
print("---> \(result)")
if let errorResult = result as? ErrorResult {
// Handle error
print("error from sdk: \(errorResult.message)")
} else if let successResult = result as? SuccessResult {
// Handle success
if let message = successResult.message {
print("success from sdk: \(message)")
}
}
}
}
To integrate the SDK into an Objective-C project, you can create a view controller in swift. Launch the SDK within the view controller, and initialize the view controller created in swift from your Objective-C view controller or code. Make sure to configure your Objective-C project correctly to enable the use of a view controller created in swift.
For additional guidance on how to use our iOS SDK, please refer to our Objective C Sample Project and Swift Sample Project.
Updated about 1 year ago