Skip to content

Commit

Permalink
Merge pull request #405 from onfido/release/31.0.0
Browse files Browse the repository at this point in the history
🔖 Release 31.0.0
  • Loading branch information
vguerci authored Oct 14, 2024
2 parents a5e2766 + 8559889 commit e08ce73
Show file tree
Hide file tree
Showing 54 changed files with 4,140 additions and 1,772 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,14 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

**Note**: If the strings translations change it will result in a MINOR version change, therefore you are responsible for testing your translated layout in case you are using custom translations. [More on language localisation](README.md#language-customisation)

## [31.0.0] - 2024-09-18

### Added

- Added APIs for encrypted biometric token storage and retrieval
- Proof of Address supports 2-sided documents
- Added new API to accept translation overrides for Proof of Address, One-Time Password and Qualified Electronic Signature

## [30.6.1] - 2024-09-26

### Fixed
Expand Down
File renamed without changes.
106 changes: 106 additions & 0 deletions MIGRATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

These guides below are provided to ease the transition of existing applications using the Onfido SDK from one version to another that introduces breaking API changes.

* [Onfido iOS SDK 31.0.0 Migration Guide](#onfido-ios-sdk-3100-migration-guide)
* [Onfido iOS SDK 30.2.0 Migration Guide](#onfido-ios-sdk-3020-migration-guide)
* [Onfido iOS SDK 30.0.0 Migration Guide](#onfido-ios-sdk-3000-migration-guide)
* [Onfido iOS SDK 29.9.0 Migration Guide](#onfido-ios-sdk-2990-migration-guide)
Expand Down Expand Up @@ -68,6 +69,111 @@ These guides below are provided to ease the transition of existing applications
* [Onfido iOS SDK 4.0.0 Migration Guide](#onfido-sdk-400-migration-guide)
* [Onfido iOS SDK 3.0.0 Migration Guide](#onfido-sdk-300-migration-guide)

## Onfido iOS SDK 31.0.0 Migration Guide

### Breaking API Changes

- The Proof of Address result object has changed and now supports 2-sided documents. We have changed the object's structure and moved the `id` and `type` parameters into the new `ProofOfAddressSideResult` object to do so. Please update your integration if you are using the Onfido Proof of Address feature.

Below is a sample of the new instance returned by a flow with `FlowStep.proofOfAddress`:
```
Proof of address:
ProofOfAddress(type = UTILITY_BILL, front = (id = front_side_id, type = (optional)), back = (id = back_side_id, type = (optional)))
```

- Custom translations for the Proof of Address (PoA), One Time Password (OTP) and Qualified Electronic Signature (QES) modules should now be passed directly through a dictionary of strings, or through a JSON file of customized translations. For more information, please refer to our [documentation](/#custom-translations-and-text).

### String Changes

#### Removed

The following strings have been **removed** from the `Localizable.strings` files and replaced by the following keys:

- `onfido_country_select_bottom_sheet_link_close` -> `proofOfAddress.country.alert.close`
- `onfido_country_select_bottom_sheet_title` -> `proofOfAddress.country.alert.intro`
- `onfido_doc_capture_frame_accessibility` -> `proofOfAddress.capture.frame_accessibility`
- `onfido_doc_confirmation_body` -> `proofOfAddress.preview.body_council_tax`
- `onfido_doc_select_button_address_card` -> `common.selection.address_card`
- `onfido_doc_select_button_address_card_detail` -> `common.selection.address_card_details`
- `onfido_doc_select_button_bank_statement` -> `common.selection.bank_building_society_statement`
- `onfido_doc_select_button_benefits_letter` -> `common.selection.benefit_letters`
- `onfido_doc_select_button_benefits_letter_detail` -> `common.selection.benefit_letters_details`
- `onfido_doc_select_button_bill` -> `common.selection.utility_bill`
- `onfido_doc_select_button_bill_detail` -> `common.selection.utility_bill_details`
- `onfido_doc_select_button_tax_letter` -> `common.selection.council_tax`
- `onfido_doc_select_extra_estatements_ok` -> `common.selection.utility_bill_extra`
- `onfido_doc_select_extra_no_mobile` -> `document.selection.no_mobile`
- `onfido_doc_select_subtitle_poa` -> `proofOfAddress.selection.subtitle`
- `onfido_poa_cancel` -> `proofOfAddress.upload.dialog.cancel`
- `onfido_poa_capture_choose_another` -> `proofOfAddress.preview.choose_another_photo`
- `onfido_poa_capture_confirm` -> `proofOfAddress.country.button_primary`
- `onfido_poa_capture_enlarge` -> `proofOfAddress.preview.image.zoom_text`
- `onfido_poa_capture_enlarge_close` -> `proofOfAddress.preview.image.zoom_close`
- `onfido_poa_capture_enlarge_move` -> `proofOfAddress.preview.image.zoom_move`
- `onfido_poa_capture_image_accessibility` -> `proofOfAddress.preview.image.accessibility`
- `onfido_poa_capture_instructions` -> `proofOfAddress.capture.instructions`
- `onfido_poa_capture_redo` -> `proofOfAddress.preview.redo`
- `onfido_poa_country_not_found` -> `proofOfAddress.country.alert.country_not_found`
- `onfido_poa_err_invalid_file_message` -> `proofOfAddress.upload.error.invalid_file_dialog_message`
- `onfido_poa_err_invalid_file_ok` -> `proofOfAddress.upload.error.invalid_file_dialog_ok`
- `onfido_poa_err_invalid_file_title` -> `common.error.errors.invalid_type.instruction`
- `onfido_poa_files` -> `proofOfAddress.upload.dialog.files`
- `onfido_poa_guidance_button_primary` -> `proofOfAddress.guide.button_primary`
- `onfido_poa_guidance_instructions_address` -> `proofOfAddress.guide.instructions.address`
- `onfido_poa_guidance_instructions_address_card_issue_date` -> `proofOfAddress.guide.instructions.address_card_issue_date`
- `onfido_poa_guidance_instructions_expiry_date` -> `proofOfAddress.guide.instructions.expiry_date`
- `onfido_poa_guidance_instructions_full_address` -> `proofOfAddress.guide.instructions.full_address`
- `onfido_poa_guidance_instructions_full_name` -> `proofOfAddress.guide.instructions.full_name`
- `onfido_poa_guidance_instructions_issue_date` -> `proofOfAddress.guide.instructions.issue_date`
- `onfido_poa_guidance_instructions_label` -> `proofOfAddress.guide.instructions.label`
- `onfido_poa_guidance_instructions_logo` -> `proofOfAddress.guide.instructions.logo`
- `onfido_poa_guidance_subtitle_address_card` -> `proofOfAddress.guide.subtitle_address_certificate`
- `onfido_poa_guidance_subtitle_bank_statement` -> `proofOfAddress.guide.subitle_bank_statement`
- `onfido_poa_guidance_subtitle_benefits_letter` -> `proofOfAddress.guide.subtitle_benefit_letters`
- `onfido_poa_guidance_subtitle_bill` -> `proofOfAddress.guide.subtitle_bill`
- `onfido_poa_guidance_subtitle_tax_letter` -> `proofOfAddress.guide.subtitle_tax_letter`
- `onfido_poa_intro_button_primary` -> `proofOfAddress.intro.button_primary`
- `onfido_poa_intro_list_matches_signup` -> `proofOfAddress.intro.list_current_address`
- `onfido_poa_intro_list_most_recent` -> `proofOfAddress.intro.list_signup_address`
- `onfido_poa_intro_list_shows_address` -> `proofOfAddress.intro.list_recent_document`
- `onfido_poa_intro_subtitle` -> `proofOfAddress.intro.subtitle`
- `onfido_poa_intro_title` -> `proofOfAddress.intro.title`
- `onfido_poa_photo_library` -> `proofOfAddress.upload.dialog.photo_library`
- `onfido_poa_type_selection_title` -> `proofOfAddress.selection.title`
- `onfido_poa_type_selection_title_uk` -> `proofOfAddress.selection.title_uk`
- `onfido_poa_upload_instructions_take_photo_button` -> `proofOfAddress.upload.take_photo`
- `onfido_poa_upload_instructions_upload_button` -> `proofOfAddress.upload.upload_photo`
- `onfido_poa_welcome_text` -> `welcome.list_item.poa`

Please note that the new keys follow a strict structure when being represented in a Dictionary, or in the JSON file. Taking `proofOfAddress.upload.take_photo` as an example, the Dictionary representation of this for `en_US` would be:

```swift
[
"en_US": [
"proofOfAddress": [
"upload": [
"take_photo": "Take Photo"
]
]
]
]
```

The JSON representation would be:

```javascript
{
"en_US": {
"proofOfAddress": {
"upload": {
"take_photo": "Take Photo"
}
}
}
}
```

## Onfido iOS SDK 30.2.0 Migration Guide

### Deprecated API Changes
Expand Down
4 changes: 2 additions & 2 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ let package = Package(

.binaryTarget(
name: "Onfido",
url: "https://s3-eu-west-1.amazonaws.com/onfido-sdks/ios/Onfido-v30.6.1.zip",
checksum: "59bb7003e4aead43613bea01171e507537e528870e44fa2582a07b3ed3553fca"
url: "https://s3-eu-west-1.amazonaws.com/onfido-sdks/ios/Onfido-v31.0.0.zip",
checksum: "fa7d5b22c642fc6c19977f86669ac4026fa430bb3ded383dc670275bdd4fc55d"
),


Expand Down
108 changes: 103 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -433,9 +433,92 @@ For the list of languages supported by Onfido, please refer to our [SDK customiz

**Note**: If no language is selected, the SDK will detect and use the end user's device language setting. If the device's language is not supported, the SDK will default to English (`en_US`).

#### Custom languages
#### Custom translations and text

The SDK can also be displayed in a custom language for locales that Onfido does not currently support. You can supply
In addition to selecting a default language for the SDK session, the SDK can also be initialized with custom text and translations for each required language.

Depending on which verification steps you are including in your flow, custom translations are implemented in one of two ways, both of which are documented below.

##### Custom translations for Proof of Address, One Time Password and Qualified Electronic Signature

For the Proof of Address (PoA), One Time Password (OTP) and Qualified Electronic Signature (QES) steps, custom translations can be passed directly through a dictionary of strings, or through a JSON file of customized translations.

##### Swift

```swift
let configBuilder = OnfidoConfig.builder()

// Passing a dictionary directly
let customTranslations: [String: Any] = [
"en_US": [
"proofOfAddress": [
"intro": [
"title": "Custom Title"
]
]
],
"es": [
"oneTimePassword": [
"send_code": [
"title": "Custom Title"
]
]
]
]
configBuilder.withCustomTranslations(customTranslations)

// Passing a JSON file of the customized translations. The `.json` prefix
// is not required. The API expects only a JSON file to be provided
let bundle: Bundle = .main // Or any Bundle you have stored the file in
configBuilder.withCustomTranslations(filename: "CustomTranslations", in: .main)
```

##### Objective-C

```objc
ONFlowConfigBuilder *configBuilder = [ONFlowConfig builder];

// Passing a dictionary directly
NSDictionary *customTranslations = @{
@"en_US": @{
@"proofOfAddress": @{
@"intro": @{
@"title": @"Custom Title"
}
}
},
@"es": @{
@"oneTimePassword": @{
@"send_code": @{
@"title": @"Custom Title"
}
}
}
};
[configBuilder withCustomTranslations: customTranslations];

// Passing a JSON file of the customized translations
NSBundle *bundle = [NSBundle mainBundle]; // Or any other Bundle where you have stored the file
[configBuilder withCustomTranslationsWithFilename: @"CustomTranslations" in: bundle];
```
Strings for the PoA, OTP and QES steps have been removed from the `Localizable.strings` file. For the full list of removed strings, refer to the [migration guide](/migration/#onfido-ios-sdk-3100-migration-guide).
##### Identifying language keys
The full list of keys that can be customized in the Onfido iOS SDK is available on the Onfido CDN and is split by module and language.
| File URL | Description |
| --- | --- |
| https://sdk.onfido.com/capture/i18n/proofOfAddress/en_US.json | Proof of Address screens |
| https://sdk.onfido.com/capture/i18n/oneTimePassword/en_US.json | One-Time-Password (OTP) screens |
| https://sdk.onfido.com/capture/i18n/qualifiedElectronicSignature/en_US.json | Qualified Electronic Signature (QES) screens |
**Note** that the same keys are available across all supported languages and are accessible by specifying the appropriate language name in the URL (en_US.json in the examples above). The full list of supported languages and their language codes can be found in our [SDK customization guide](/sdk-customization/#language-localization).
##### Custom translations for all other verification steps
For all other verification steps, the iOS SDK also allows for the selection of a specific custom language. You can supply
full or partial translations. For any key without a translation, the supported language default will be used.
When adding custom translations, you must add the whole set of keys included in the `Localizable.strings` file.
Expand Down Expand Up @@ -1351,6 +1434,21 @@ if (flowWithDocumentResults.count > 0) {
}
```
Sample of instance returned by a flow with `FlowStep.document`, `FlowStep.face` and `FlowStep.proofOfAddress`:
```
Document:
Front: DocumentSideResult(id=document_id, side=FRONT, type=DRIVING_LICENCE, issuingCounfry=GBR)
Back: DocumentSideResult(id=document_id, side=BACK, type=DRIVING_LICENCE, issuingCounfry=GBR)
Type: DRIVING_LICENCE
Face:
Face(id=face_id, variant=PHOTO)

Proof of address:
ProofOfAddress(type=UTILITY_BILL, front=(id=front_side_id, type=(optional)), back=(id=back_side_id, type=(optional)))

```
To access the result object for a face capture, change the type to `ONFlowResultTypeFace`.
### Error handling
Expand Down Expand Up @@ -1705,7 +1803,7 @@ class CustomTokenHandlerClass: EncryptedBiometricTokenHandler {
// You store `customerUserHash` and `encryptedBiometricToken` however you choose to do so
}
func onTokenRequested(customerUserHash: String, completion: (String) -> Void) {
func onTokenRequested(customerUserHash: String, completion: @escaping (String) -> Void) {
// You use the `customerUserHash` to retrieve the encrypted biometric token you have stored and call `completion`, passing in this token
}
}
Expand Down Expand Up @@ -1803,8 +1901,8 @@ details.
## Licensing
Due to API design constraints, and to avoid possible conflicts during the integration, we bundle some of our 3rd party
dependencies. For those, we include the licensing information inside our bundle and also in this repo under license
folder, with the file named [onfido_licenses.json](license/onfido_licenses.json).
dependencies. For those, we include the licensing information inside our bundle and also in this repo under licenses
folder, with the file named [onfido_licenses.json](licenses/onfido_licenses.json).
This file contains a summary of our bundled dependencies and all the licensing information required, including links to
the relevant license texts contained in the same folder.
Integrators of our library are then responsible for keeping this information along with their integrations.
Expand Down
2 changes: 1 addition & 1 deletion SampleApp/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ def setup_shared_pods
use_frameworks!
inhibit_all_warnings!

pod 'Onfido', '30.6.1'
pod 'Onfido', '31.0.0'
end

target 'SampleApp' do
Expand Down
2 changes: 1 addition & 1 deletion SampleAppObjC/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ def setup_shared_pods
use_frameworks!
inhibit_all_warnings!

pod 'Onfido', '30.6.1'
pod 'Onfido', '31.0.0'
end

target 'SampleAppObjC' do
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit e08ce73

Please sign in to comment.