Skip to content

Commit

Permalink
changes for 32.0.0 release
Browse files Browse the repository at this point in the history
  • Loading branch information
J. Doe (https://devcenter.bitrise.io/builds/setting-your-git-credentials-on-build-machines/) committed Oct 29, 2024
1 parent e08ce73 commit c55c9d1
Show file tree
Hide file tree
Showing 50 changed files with 1,941 additions and 4,098 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@ 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)

## [32.0.0] - 2024-10-28

### Fixed

- Reverted the new translation public API
- Fixed compilation issue when running SDK on the simulator

## [31.0.0] - 2024-09-18

### Added
Expand Down
169 changes: 78 additions & 91 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 32.0.0 Migration Guide](#onfido-ios-sdk-3200-migration-guide)
* [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)
Expand Down Expand Up @@ -69,111 +70,97 @@ 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
## Onfido iOS SDK 32.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.
The API `withCustomTranslations` which was added on the previous version of 31.0.0 has been reverted and removed on this version. It was removed due to poor developer experience.
If you did not start using this API on version 31.0.0, then there is no action needed.

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)))

```
### String Changes
All string changes in 31.0.0 have been reverted. If you did not follow the migration on 31.0.0, then there is no action needed.

- 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
## Onfido iOS SDK 31.0.0 Migration Guide

#### Removed
**Please note**: Some of the changes released in this version of the iOS SDK have been reverted. We recommend you **do not** use this version, and upgrade to version [32.0.0](#onfido-ios-sdk-3200-migration-guide).

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:
### Breaking API Changes

```swift
[
"en_US": [
"proofOfAddress": [
"upload": [
"take_photo": "Take Photo"
]
]
]
]
- 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)))
The JSON representation would be:

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

- (Reverted on version 32.0.0) ~Custom translations for the Proof of Address (PoA) 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).~

### (Reverted on version 32.0.0) ~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`~

## 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-v31.0.0.zip",
checksum: "fa7d5b22c642fc6c19977f86669ac4026fa430bb3ded383dc670275bdd4fc55d"
url: "https://s3-eu-west-1.amazonaws.com/onfido-sdks/ios/Onfido-v32.0.0.zip",
checksum: "0355c85bcb0f6c8a3fc3ed37cdb93bb9f3cdc42d874972ff7e56ad885c95ca66"
),


Expand Down
87 changes: 2 additions & 85 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -433,92 +433,9 @@ 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 translations and text
#### Custom languages

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
The SDK can also be displayed in a custom language for locales that Onfido does not currently support. 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
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', '31.0.0'
pod 'Onfido', '32.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', '31.0.0'
pod 'Onfido', '32.0.0'
end

target 'SampleAppObjC' do
Expand Down
Loading

0 comments on commit c55c9d1

Please sign in to comment.