public static func initWithNewConfig(for shortcode: String) -> Builder
The initWithNewConfig
method initializes IdvService.Builder using the 12-digit code generated by the ID Verification service to create an IdvService
object.
public static func initWithNewConfigFromQr(_ qrUrl: String) -> Builder
The initWithNewConfigFromQr
method initializes IdvService.Builder using the content scanned from the QR code generated by the ID Verification service to create an IdvService
object.
public static func initWithSavedConfig() -> Builder
The initWithSavedConfig
method loads saved transaction information from secure storage on the user’s device and creates an IdvService
object using the same configuration.
public func setNotificationHandler(_ handler: NotificationHandler) -> Builder
Use this method to register a NotificationHandler.
public func setPushNotificationToken(_ pnToken: Data) -> Builder
The setPushNotificationToken
method sets the push notification token that will be shared with the ID Verfication service to send a push notification to your app.
public func setPushSandbox(_ pushSandbox: Bool) -> Builder
Use this method to enable push notifications in your development environment. By default, the IdvService assumes that the app is running in production and uses the production APNS environment to send notifications.
public func create(onComplete: (Result<IdvService, Error>) -> Void)
The create
method must be called on a background thread, because it also initializes the secure encrypted storage using the keys in the keychain. This method does the following:
Creates a new Entity ID.
Initializes encrypted storage in the secure enclave on the user’s device using the EC keys.
Generates or imports the client RSA key pair used for creating the nested JWT (JWS and JWE).
Updates the app JWKs with the Id Verification service.
Returns the initialized IdvService
asynchronously.
Returns an error when: