-
Notifications
You must be signed in to change notification settings - Fork 11
Upgrade Guide
SDK v10 drops support for iOS 10 and now only supports iOS 11+.
If you are using Cocoapods, the post_install workaround for Cocoapods needs to be updated. You will need to replace the reference to 'Socket.IO-Client-Swift' with 'SwiftProtobuf' and then run pod install.
If you are using Carthage, you should update your Cartfile as specified in the README and then run carthage update with the appropriate workarounds and arguments.
The SDK now streams over WebSockets instead of Socket.IO. In practice, this means that you should replace any references to https://*.rp.secure.iproov.me with wss://*.rp.secure.iproov.me/ws when passing the streamingURL parameter to IProov.launch().
Further guidance will be forthcoming in due course for any customers making use of reverse proxies. In the meantime, please contact us to discuss your requirements further.
Note: Due to current limitations in the beta SDK it is only currently possible to stream to our beta platform at
wss://beta.rp.secure.iproov.me/ws. Passing any other streaming URL will result in a connection error. This limitation will be removed at the point of full production release.
The structure of Options has been simplified and flattened. Many existing options have been re-mapped to the new hierarchy, while others have been removed as they are no longer applicable to the new user experience.
The following table maps all SDK v9 options to their v10 equivalents:
| SDK v9 | SDK v10 |
|---|---|
ui.filter |
filter (see below) |
ui.lineColor |
Removed (now handled via the LineDrawingFilter) |
ui.backgroundColor |
Removed (now handled via the LineDrawingFilter) |
ui.stringsBundle |
stringsBundle |
ui.stringsTable |
stringsTable |
ui.headerBackgroundColor |
Removed |
ui.footerBackgroundColor |
Removed |
ui.headerTextColor |
titleTextColor |
ui.promptTextColor |
promptTextColor |
ui.footerTextColor |
Removed |
ui.closeButtonImage |
closeButtonImage |
ui.logoImage |
logoImage |
ui.floatingPromptEnabled |
Removed |
ui.floatingPromptRoundedCorners |
promptRoundedCorners |
ui.genuinePresenceAssurance.readyOverlayStrokeColor |
genuinePresenceAssurance.readyOvalStrokeColor |
ui.genuinePresenceAssurance.notReadyOverlayStrokeColor |
genuinePresenceAssurance.notReadyOvalColor |
ui.genuinePresenceAssurance.autoStartDisabled |
Removed |
ui.genuinePresenceAssurance.readyTintColor |
Removed |
ui.genuinePresenceAssurance.notReadyTintColor |
Removed |
ui.genuinePresenceAssurance.progressBarColor |
Removed |
ui.genuinePresenceAssurance.readyFloatingPromptBackgroundColor |
promptBackgroundColor |
ui.genuinePresenceAssurance.notReadyFloatingPromptBackgroundColor |
promptBackgroundColor |
ui.livenessAssurance.primaryTintColor |
Removed |
ui.livenessAssurance.secondaryTintColor |
Removed |
ui.livenessAssurance.floatingPromptBackgroundColor |
promptBackgroundColor |
ui.livenessAssurance.overlayStrokeColor |
livenessAssurance.ovalStrokeColor |
network.timeout |
timeout |
network.path |
Removed |
network.certificates |
certificates (see below) |
capture.genuinePresenceAssurance.maxYaw |
genuinePresenceAssurance.maxYaw (deprecated) |
capture.genuinePresenceAssurance.maxRoll |
genuinePresenceAssurance.maxRoll (deprecated) |
capture.genuinePresenceAssurance.maxPitch |
genuinePresenceAssurance.maxPitch (deprecated) |
In addition to the above, the following new options have been added:
| Name | Description |
|---|---|
livenessAssurance.completedOvalStrokeColor |
Color for oval stroke after LA scan completes. |
surroundColor |
Color applied the area outside the oval. |
In prior SDK versions, the permitted filter options were .shaded (default), .classic and .vibrant.
These filter options still exist, but are now grouped under a LineDrawingFilter class, and are set via the style property. For example:
options.filter = LineDrawingFilter(style: .vibrant,
foregroundColor: .black, // previously lineColor
backgroundColor: .white)SDK v10 also introduces a new NaturalFilter which is available in both .clear and .blur styles:
options.filter = NaturalFilter(style: .clear)Note:
NaturalFilteris only available for Liveness Assurance claims. Attempting to useNaturalFilterwith Genuine Presence Assurance claims will result in an error.
In SDK v9.1 and above it was possible to pass certificates as either String values (treated as paths to the certificate, generally included in your app bundle), or Data values (the certificates themselves). In SDK v9.0 and below it was possible to specify String values only.
In SDK v10 it is now only possible to pass certificates as Data.
If you have an existing certificate (certificate.der) you wish to load from your app bundle, you can use the following code:
options.certificates = [try! Data(contentsOf: URL(fileURLWithPath: Bundle.main.path(forResource: "certificate", ofType: "der")!))]You may prefer to load your certificate directly from base64-encoded data, such as:
options.certificates = Data(base64Encoded: "...")The genuinePresenceAssurance.maxYaw, genuinePresenceAssurance.maxRoll & genuinePresenceAssurance.maxPitch options all relate to "pose control" which is a deprecated feature which will be removed from a future SDK version.
If you believe you may be affected by the future removal of pose control, please contact us to discuss further.
In SDK v9 and below, the final parameter passed to IProov.launch() was named callback, which meant that the following was possible:
IProov.launch(streamingURL: "...", callback: { status in ... })In SDK v10 the parameter is now unnamed, which further encourages use of Swift's trailing closure syntax:
IProov.launch(streamingURL: "...") { status in ... }SuccessResult no longer contains the token property. This property is redundant, because the token is the same as the one passed to IProov.launch().
FailureResult no longer contains the token property. This property is redundant, because the token is the same as the one passed to IProov.launch().
The reason property on FailureResult has been changed. It is no longer a String to be displayed to the user, instead it is now an enum of potential failure reasons.
Instead of using failureResult.reason, you can now use failureResult.localizedDescription for a user-facing localized description of how to recover from the failure.
.cancelled now has an associated value of type Canceller which will be either .user (if the user cancelled the scan by pressing the back button in the iProov UI or suspending the app), or .app if the SDK was cancelled by you calling the new .cancel() API to cancel the SDK programmatically from your app.
The SDK strings have been updated and are now available in 9 additional languages alongside English. For your convenience, you can find a copy of the latest Localizable.strings file in the resources folder here.
The following strings have been added:
| Name | Default text (English) |
|---|---|
IProov_PromptAlignFace |
Put your face in the oval |
IProov_FailureEyesClosed |
Keep your eyes open |
IProov_FailureFaceTooClose |
Move your face farther from the screen |
IProov_FailureFaceTooFar |
Move your face closer to the screen |
IProov_FailureMisalignedFace |
Keep your face in the oval |
IProov_FailureNotSupported |
Device is not supported |
IProov_FailureObscuredFace |
Remove any face coverings |
IProov_FailureSunglasses |
Remove sunglasses |
IProov_FailureTooBright |
Move somewhere darker |
IProov_FailureTooDark |
Move somewhere brighter |
IProov_FailureTooMuchMovement |
Keep still |
IProov_FailureUnknown |
Try again |
IProov_FailureUserTimeout |
Try again |
The following strings have been renamed:
| v9 | v10 |
|---|---|
IProov_AlignFaceVoiceOverPrompt |
IProov_PromptAlignFaceAccessibility |
IProov_ErrorCameraPermissionDeniedMessageIos |
IProov_ErrorCameraPermissionDeniedMessage |
The following strings have been removed:
| Name | Rationale |
|---|---|
IProov_MessageFormat |
Relates to auto-generated title, removed in SDK v9.5.0 |
IProov_PromptTapToBegin |
"Tap to start" feature has been removed |
IProov_PromptLivenessAlignFace |
Use IProov_PromptAlignFace instead (see above) |
IProov_PromptLivenessNoTarget |
Use IProov_PromptAlignFace instead (see above) |
IProov_PromptGenuinePresenceAlignFace |
Use IProov_PromptAlignFace instead (see above) |
IProov_ProgressStreamingSlow |
This can now be handled in your app instead |
IProov_PromptGrantPermission |
Use IProov_ErrorCameraPermissionDenied instead |
IProov_PromptGrantPermissionMessage |
Use IProov_ErrorCameraPermissionDeniedMessage instead |
IProov_FailureAmbiguousOutcome |
Use IProov_FailureUnknown instead (see above) |
IProov_FailureLightingBacklit |
Use new failure cases instead (see above) |
IProov_FailureLightingFaceTooBright |
Use IProov_FailureTooBright instead (see above) |
IProov_FailureLightingFlashReflectionTooLow |
Use new failure cases instead (see above) |
IProov_FailureLightingTooDark |
Use IProov_FailureTooDark instead (see above) |
IProov_FailureMotionTooMuchMouthMovement |
Use IProov_FailureTooMuchMovement instead (see above) |
IProov_FailureMotionTooMuchMovement |
Use IProov_FailureTooMuchMovement instead (see above) |
If you are using the iOS Biometrics SDK in conjunction with the Web Biometrics SDK via Native Bridge, you are recommended to upgrade to Web SDK v4.0+ as the Native Bridge protocol has been updated.
For details on upgrading to earlier SDK versions, consult the following: