Methods

submitDataForVerification

public func submitDataForVerification(data: [IdCard], onComplete: (Result<VerifyStatus, IdvError>) -> Void)

The submitDataForVerification method accepts the user ID information from the app, performs client side verification of the data, and sends the data to the ID Verification service. The SDK retains the transaction ID and service endpoints in encrypted storage on the user device. The completion block (onComplete) notifies the app when the data is shared successfully, or when any errors occur during the process. The updated transaction status is returned in Result.

Internally, the SDK puts the ID information in a secure message to be sent to the ID Verification service. When creating the message, the SDK checks whether any existing claims can be found in secure storage for the given IDs. If the ID information is found, the claims are sent to the ID Verification service with the ID data. This prevents repeated verifications for the same IDs.

checkVerificationStatus

public func checkVerificationStatus(handler: NotificationHandler? = nil)

The checkVerificationStatus method requests the verification status from the ID Verification service, and forwards the status, with any errors or claims, to the callback methods in NotificationHandler. You can register a NotificationHandler using IdvService.Builder or pass one as a function parameter to this method.

setNotificationHandler

public func setNotificationHandler(_handler: NotificationHandler)

Use this method to register a NotificationHandler.

submitDataForVerification

public func submitDataForVerification(data: [IdCard], onComplete: (Result<VerifyStatus, IdvError>) -> Void)

The submitDataForVerification method accepts the user ID information from the app, performs client side validation of the data, and sends the data to the ID Verification service. The SDK retains the transaction ID and service endpoints in encrypted storage on the user device. The completion block (onComplete) notifies the app when the data is shared successfully, or when any errors occur during the process. The updated transaction status is returned in Result.

Internally, the SDK puts the ID information, and a one time security token, in a secure message to be sent to the ID Verification service. When creating the message, the SDK checks whether any existing claims can be found in secure storage for the given IDs. If the ID information is found, the claims are sent to the ID Verification service with the ID data. This prevents repeated validations for the same IDs.

processNotification

public func processNotification(userInfo: [AnyHashable : Any]?, handler: NotificationHandler? = nil) -> Bool

The processNotification method should be called whenever you receive a notification in your app. The method returns true if the notification can be handled by IdvService and it returns false if the service cannot recognize it as a PingOne notification. If the notification indicates that the verification process has completed, the service will call checkVerificationStatus internally, and pass the result to the NotificationHandler callback.

isSandbox

public func isSandbox() -> Bool

The isSandbox method returns a boolean indicating whether IdvService is set for sending push notification in the development (false) or production environment (true).

setPushSandbox

public func setPushSandbox(_ pushSandbox: Bool)

Use this method to enable push notifications in the development environment. By default, the IdvService assumes that the app is running in production and uses the production APNS environment to send notifications.