From 770ce7b91b038164f482be9443d824e4174df02e Mon Sep 17 00:00:00 2001 From: Anurag Ajwani Date: Thu, 25 Apr 2019 16:41:57 +0100 Subject: [PATCH] Updated version --- CHANGELOG.md | 17 +++++- Localizable.strings | 33 +++++++++++- MIGRATION.md | 52 +++++++++++++++++++ README.md | 32 +++++++----- SampleApp/Podfile | 3 +- SampleApp/SampleApp.xcodeproj/project.pbxproj | 12 +++-- SampleApp/SampleApp/AppDelegate.swift | 30 ----------- 7 files changed, 128 insertions(+), 51 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 831f8db..0f24ca6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,11 +6,25 @@ 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) +## [11.1.0] - 2019-04-25 + +### Added +- UI: Added work permit document type support(beta) +- UI: Accessibility voiceover improvements for all screens +- UI: Camera, Microphone and both camera and microphone permission screens added before requesting permissions + +### Changed +- UI: Changed document capture area ratio for passport +- UI: Changed circle loading indicator to progress bar for document and video upload progress + +### Fixed +- UI: Fixed crash issue during recording video in some cases + ## [11.0.1] - 2019-04-08 ### Fixed -- Public: fixed nullability warning - Public: fixed debug SDK not compiling for simulators +- Public: fixed nullability warning ## [11.0.0] - 2019-04-01 @@ -27,6 +41,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Public: Allowing custom localisation from non-localised strings file ### Fixed + - UI: Fixed crash when capture and retake buttons tapped continuously - Public: Fixed SDK not throwing error when user denies microphone permission during liveness capture (face capture video variant) diff --git a/Localizable.strings b/Localizable.strings index 9f1e921..8602839 100644 --- a/Localizable.strings +++ b/Localizable.strings @@ -23,6 +23,7 @@ "onfido_label_doc_type_id_card_up" = "National Identity Card"; "onfido_label_doc_type_residence_permit_up" = "Residence Permit Card"; "onfido_label_doc_type_visa_up" = "Visa"; +"onfido_label_doc_type_work_permit_up" = "Work Permit"; /* Country selection */ @@ -59,6 +60,12 @@ "onfido_message_side_document_back_national_id" = "Back of card"; "onfido_message_document_capture_info_back_national_id" = "Position the back of your card in the frame"; +"onfido_message_side_document_front_generic" = "Front of document"; +"onfido_message_document_capture_info_front_generic" = "Position the front of your document in the frame"; + +"onfido_message_side_document_back_generic" = "Back of document"; +"onfido_message_document_capture_info_back_generic" = "Position the back of your document in the frame"; + "onfido_glare_detected_title" = "Glare detected"; "onfido_glare_detected_subtitle" = "Try moving away from direct light"; @@ -69,12 +76,14 @@ "onfido_message_check_readability_subtitle_driving_license" = "Make sure your license details are clear to read, with no blur or glare"; "onfido_message_check_readability_subtitle_national_id" = "Make sure your card details are clear to read, with no blur or glare"; "onfido_message_check_readability_subtitle_visa" = "Make sure your visa details are clear to read, with no blur or glare"; +"onfido_message_check_readability_subtitle_generic" = "Make sure your document details are clear to read, with no blur or glare"; "onfido_confirm_passport" = "My passport is readable"; "onfido_confirm_residence_permit" = "My permit is readable"; "onfido_confirm_driving_license" = "My license is readable"; "onfido_confirm_national_id" = "My card is readable"; "onfido_confirm_visa" = "My visa is readable"; +"onfido_confirm_generic_document" = "My document is readable"; /* Document error */ @@ -112,6 +121,7 @@ "onfido_message_validation_error_multiple_faces" = "Only your face can be in the selfie"; /* Liveness intro */ + "onfido_liveness_intro_subtitle" = "Let's make sure nobody's impersonating you"; "onfido_reload" = "Reload"; "onfido_unable_load_unstable_network" = "Unable to load due to unstable network"; @@ -132,11 +142,29 @@ "onfido_wrong_side" = "Wrong side"; /* Liveness confirmation */ + "onfido_welcome_view_toolbar_title" = "Identity verification"; "onfido_retake_video" = "Retake video"; "onfido_submit_video" = "Submit video"; "onfido_video_recorded" = "Your video has been recorded"; +/* Device permission */ + +"onfido_device_permission_title_both" = "Allow camera and microphone access"; +"onfido_device_permission_subtitle_both" = "When prompted, you must enable access for both to continue"; +"onfido_device_permission_instructions_both" = "We cannot verify you without using both your camera and microphone"; +"onfido_device_permission_btn_title_both" = "Enable both"; + +"onfido_device_permission_title_camera" = "Allow camera access"; +"onfido_device_permission_subtitle_camera" = "When prompted, you must enable camera access to continue"; +"onfido_device_permission_instructions_camera" = "We cannot verify you without using your camera"; +"onfido_device_permission_btn_title_camera" = "Enable camera"; + +"onfido_device_permission_title_mic" = "Allow microphone access"; +"onfido_device_permission_subtitle_mic" = "When prompted, you must enable microphone access to continue"; +"onfido_device_permission_instructions_mic" = "We cannot verify you without using your microphone"; +"onfido_device_permission_btn_title_mic" = "Enable microphone"; + /* Locale identifier */ "onfido_locale" = "en"; @@ -167,10 +195,13 @@ "onfido_accessibility_camera_face_capture_view" = "View from selfie camera"; "onfido_accessibility_document_confirmation_view" = "Photo of your document"; "onfido_accessibility_face_confirmation_view" = "Photo of your face"; -"onfido_accessibility_camera_capture_shutter" = "Capture image"; +"onfido_accessibility_camera_capture_shutter" = "Shutter"; "onfido_accessibility_liveness_confirmation_view" = "Your video"; "onfido_start_recording" = "Start recording"; "onfido_finish_recording" = "Finish recording"; "onfido_next_step" = "Next step"; "onfido_start" = "Start"; "onfido_message_loading" = "Loading"; +"onfido_accessibility_liveness_video_example" = "Example video showing how to record a selfie video"; +"onfido_message_uploading" = "Uploading"; +"onfido_accessibility_liveness_face_detected" = "Face detected"; diff --git a/MIGRATION.md b/MIGRATION.md index d1a4323..4c9eef3 100644 --- a/MIGRATION.md +++ b/MIGRATION.md @@ -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 11.1.0 Migration Guide](#onfido-sdk-1110-migration-guide) * [Onfido iOS SDK 11.0.0 Migration Guide](#onfido-sdk-1100-migration-guide) * [Onfido iOS SDK 10.6.0 Migration Guide](#onfido-sdk-1060-migration-guide) * [Onfido iOS SDK 10.5.0 Migration Guide](#onfido-sdk-1050-migration-guide) @@ -23,6 +24,37 @@ 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 11.1.0 Migration Guide + +### Deprecated + +- `Onfido-Release` framework is deprecated and will be removed in a future version of the Onfido SDK. + +If using Cocoapods change `Podfile` from: +```ruby +pod 'Onfido', :configurations => ['Debug'] +pod 'Onfido-Release', :configurations => ['Release'] +``` +to: +```ruby +pod 'Onfido' +``` + +For manual installation add a Run Script Phase to your app `Build Phases` after `Embed Frameworks` step with the following code: +```bash +if [[ "$ACTION" != "install" ]]; then +exit 0; +fi + +FRAMEWORK_DIR="${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" +ONFIDO_FRAMEWORK="${FRAMEWORK_DIR}/Onfido.framework" + +cd "${ONFIDO_FRAMEWORK}" + +lipo -remove i386 Onfido -o Onfido +lipo -remove x86_64 Onfido -o Onfido +``` + ## Onfido iOS SDK 11.0.0 Migration Guide ### Requirements @@ -33,6 +65,26 @@ These guides below are provided to ease the transition of existing applications The following string keys have been **added**: - `onfido_wrong_side` +- `onfido_device_permission_title_both` +- `onfido_device_permission_subtitle_both` +- `onfido_device_permission_instructions_both` +- `onfido_device_permission_btn_title_both` +- `onfido_device_permission_title_camera` +- `onfido_device_permission_subtitle_camera` +- `onfido_device_permission_instructions_camera` +- `onfido_device_permission_btn_title_camera` +- `onfido_device_permission_title_mic` +- `onfido_device_permission_subtitle_mic` +- `onfido_device_permission_instructions_mic` +- `onfido_device_permission_btn_title_mic` +- `onfido_message_uploading` +- `onfido_label_doc_type_work_permit_up` +- `onfido_message_side_document_front_generic` +- `onfido_message_document_capture_info_front_generic` +- `onfido_message_side_document_back_generic` +- `onfido_message_document_capture_info_back_generic` +- `onfido_message_check_readability_subtitle_work_permit` +- `onfido_confirm_generic_document` ## Onfido iOS SDK 10.6.0 Migration Guide diff --git a/README.md b/README.md index e48858d..e833c89 100644 --- a/README.md +++ b/README.md @@ -43,7 +43,7 @@ This SDK provides a drop-in set of screens and tools for iOS applications to all ### 1. Obtaining tokens -In order to start integration, you will need the **API token** and the **mobile SDK token**. You can use our [sandbox](https://documentation.onfido.com/#testing) environment to test your integration, and you will find these two sandbox tokens inside your [Onfido Dashboard](https://onfido.com/dashboard/api/tokens). +In order to start integration, you will need the **API token** and the **mobile SDK token**. You can use our [sandbox](https://documentation.onfido.com/#sandbox-testing) environment to test your integration, and you will find these two sandbox tokens inside your [Onfido Dashboard](https://onfido.com/dashboard/api/tokens). **Warning:** You **MUST** use the **mobile SDK token** and not the **API token** when configuring the SDK itself. @@ -66,8 +66,7 @@ The Onfido SDK makes use of the device Camera. You will be required to have the The SDK is available on Cocoapods and you can include it in your projects by adding the following to your Podfile: ```ruby -pod 'Onfido', :configurations => ['Debug'] -pod 'Onfido-Release', :configurations => ['Release'] +pod 'Onfido' ``` Run `pod install` to get the sdk. @@ -76,9 +75,23 @@ Run `pod install` to get the sdk. The SDK is available in [Github Releases tab](https://github.com/onfido/onfido-ios-sdk/releases) where you can download the compressed framework, you can find the latest release [here](https://github.com/onfido/onfido-ios-sdk/releases/latest). -1. [Download](https://github.com/onfido/onfido-ios-sdk/releases/latest) the compressed zip file containing the `Onfido.framework`. +1. [Download](https://github.com/onfido/onfido-ios-sdk/releases/latest) the compressed debug zip file containing the `Onfido.framework`. 2. Uncompress the zip file and then move the `Onfido.framework` artefact into your project. 3. Add `Onfido.framework` located within your project to the `Embedded binaries` section in the `General` tab of you iOS app target. +4. Open your app's project file in Xcode. Then select your app's target under target list. Next select `Build Phases` tab and under `Embed Frameworks` step add a new `Run Script Phase`. Name it `Onfido Framework Archive`. In the text area add the following code: +```bash +if [[ "$ACTION" != "install" ]]; then +exit 0; +fi + +FRAMEWORK_DIR="${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" +ONFIDO_FRAMEWORK="${FRAMEWORK_DIR}/Onfido.framework" + +cd "${ONFIDO_FRAMEWORK}" + +lipo -remove i386 Onfido -o Onfido +lipo -remove x86_64 Onfido -o Onfido +``` ### 4. Creating an Applicant @@ -505,6 +518,7 @@ The document step can be further configured to capture single document types fro - National Identity Card: `DocumentType.nationalIdentityCard` (`ONDocumentTypeNationalIdentityCard` for Objective-C) - Residence Permit: `DocumentType.residencePermit` (`ONDocumentTypeResidencePermit` for Objective-C) - Visa: `DocumentType.visa` (`ONDocumentTypeVisa` for Objective-C) +- Work Permit: `DocumentType.workPermit` (`ONDocumentTypeWorkPermit` for Objective-C) Let's say that you would like to capture only driving licenses from the United Kingdom. The following code shows how to do this: @@ -641,7 +655,7 @@ Refer to the [Authentication](https://documentation.onfido.com/#authentication) ### 2. Creating a check -You will need to create an *express* check by making a request to the [create check endpoint](https://documentation.onfido.com/#create-check), using the applicant id. If you are just verifying a document, you only have to include a [document report](https://documentation.onfido.com/#document-report) as part of the check. On the other hand, if you are verifying a document and a face photo/live video, you will also have to include a [facial similarity report](https://documentation.onfido.com/#facial-similarity) with the corresponding variants: `standard` for the photo option and `video` for the video option. +You will need to create an *express* check by making a request to the [create check endpoint](https://documentation.onfido.com/#create-check), using the applicant id. If you are just verifying a document, you only have to include a [document report](https://documentation.onfido.com/#document-report) as part of the check. On the other hand, if you are verifying a document and a face photo/live video, you will also have to include a [facial similarity report](https://documentation.onfido.com/#facial-similarity-report) with the corresponding variants: `standard` for the photo option and `video` for the video option. ```shell $ curl https://api.onfido.com/v2/applicants/YOUR_APPLICANT_ID/checks \ @@ -656,7 +670,7 @@ Note: you can also submit the POST request in JSON format. You will receive a response containing the check id instantly. As document and facial similarity reports do not always return actual [results](https://documentation.onfido.com/#results) straightaway, you need to set up a webhook to get notified when the results are ready. -Finally, as you are testing with the sandbox token, please be aware that the results are pre-determined. You can learn more about sandbox responses [here](https://documentation.onfido.com/#sandbox-responses). +Finally, as you are testing with the sandbox token, please be aware that the results are pre-determined. You can learn more about sandbox responses [here](https://documentation.onfido.com/#pre-determined-responses). ### 3. Setting up webhooks @@ -703,12 +717,6 @@ print(mitLicenseFileContents) ## More Information -### App Store submission - -During development it is OK to use `pod 'Onfido'` but that will fail App Store submission. Please use `pod 'Onfido-Release'` in your Podfile for App Store submission. - -For more information as to why we do this please check out our [FAQ's](docs/FAQ.md) - ### Sample App We have included sample apps to show how to integrate with the Onfido SDK using both Swift and Objective-C. Check out respectively the `SampleApp` and `SampleAppObjC` directories. diff --git a/SampleApp/Podfile b/SampleApp/Podfile index 439a027..fefad9e 100644 --- a/SampleApp/Podfile +++ b/SampleApp/Podfile @@ -6,7 +6,6 @@ target 'SampleApp' do use_frameworks! # Pods for SampleApp - pod 'Onfido', :configurations => ['Debug'] - pod 'Onfido-Release', :configurations => ['Release'] + pod 'Onfido' pod 'Alamofire' end diff --git a/SampleApp/SampleApp.xcodeproj/project.pbxproj b/SampleApp/SampleApp.xcodeproj/project.pbxproj index 50be2ab..f9ad458 100644 --- a/SampleApp/SampleApp.xcodeproj/project.pbxproj +++ b/SampleApp/SampleApp.xcodeproj/project.pbxproj @@ -131,6 +131,7 @@ developmentRegion = English; hasScannedForEncodings = 0; knownRegions = ( + English, en, Base, ); @@ -164,10 +165,9 @@ files = ( ); inputPaths = ( - "${SRCROOT}/Pods/Target Support Files/Pods-SampleApp/Pods-SampleApp-frameworks.sh", + "${PODS_ROOT}/Target Support Files/Pods-SampleApp/Pods-SampleApp-frameworks.sh", "${BUILT_PRODUCTS_DIR}/Alamofire/Alamofire.framework", "${PODS_ROOT}/Onfido/Onfido.framework", - "${PODS_ROOT}/Onfido-Release/Onfido.framework", ); name = "[CP] Embed Pods Frameworks"; outputPaths = ( @@ -176,7 +176,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-SampleApp/Pods-SampleApp-frameworks.sh\"\n"; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-SampleApp/Pods-SampleApp-frameworks.sh\"\n"; showEnvVarsInLog = 0; }; AF915F6343C4D8C3BF6207A6 /* [CP] Check Pods Manifest.lock */ = { @@ -277,6 +277,7 @@ SDKROOT = iphoneos; SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 4.2; TARGETED_DEVICE_FAMILY = "1,2"; }; name = Debug; @@ -319,6 +320,7 @@ MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + SWIFT_VERSION = 4.2; TARGETED_DEVICE_FAMILY = "1,2"; VALIDATE_PRODUCT = YES; }; @@ -335,7 +337,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = com.example.SampleApp; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 3.0; + SWIFT_VERSION = 4.2; }; name = Debug; }; @@ -350,7 +352,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = com.example.SampleApp; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 3.0; + SWIFT_VERSION = 4.2; }; name = Release; }; diff --git a/SampleApp/SampleApp/AppDelegate.swift b/SampleApp/SampleApp/AppDelegate.swift index 28c69ab..b500ad7 100644 --- a/SampleApp/SampleApp/AppDelegate.swift +++ b/SampleApp/SampleApp/AppDelegate.swift @@ -12,35 +12,5 @@ import UIKit class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? - - - func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { - // Override point for customization after application launch. - return true - } - - func applicationWillResignActive(_ application: UIApplication) { - // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. - // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. - } - - func applicationDidEnterBackground(_ application: UIApplication) { - // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. - // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. - } - - func applicationWillEnterForeground(_ application: UIApplication) { - // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. - } - - func applicationDidBecomeActive(_ application: UIApplication) { - // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. - } - - func applicationWillTerminate(_ application: UIApplication) { - // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. - } - - }