Skip to content

Commit

Permalink
v7.0.1 release
Browse files Browse the repository at this point in the history
  • Loading branch information
RN SDK Release User committed Nov 28, 2022
1 parent b1b4cbd commit 9903e93
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 33 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,14 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

## next-version

## [7.0.0] - 2022-11-22
## [7.0.1] - 2022-11-28

### Changed:
- Public: Update underlying Onfido native SDK versions:
- iOS 27.0.0 (up from 26.1.1)
- Android 14.0.0 (up from 13.0.0)
- Public: Fixes on Typescript issues
- Public: Upgrade min supported version to 0.68.2 (up from 0.60.0)

## [6.1.0] - 2022-11-07

Expand Down
26 changes: 2 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
- [2. Creating an Applicant](#2-creating-an-applicant)
- [3. Configuring SDK with Tokens](#3-configuring-sdk-with-tokens)
- [4. Adding the Onfido React Native SDK to your project](#4-adding-the-onfido-react-native-sdk-to-your-project)
- [This SDK supports React Native versions 0.60.0 and later](#this-sdk-supports-react-native-versions-0600-and-later)
- [This SDK supports React Native versions 0.68.2 and later](#this-sdk-supports-react-native-versions-0600-and-later)
- [4.1 Adding SDK dependency through npm](#41-adding-sdk-dependency-through-npm)
- [4.2 Update your Android build.gradle files](#42-update-your-android-buildgradle-files)
- [4.3 Update your iOS configuration files](#43-update-your-ios-configuration-files)
Expand Down Expand Up @@ -98,7 +98,7 @@ The `application_id` is the "Application ID" or "Bundle ID" that was already set

### 4. Adding the Onfido React Native SDK to your project

#### This SDK supports React Native versions 0.60.0 and later
#### This SDK supports React Native versions 0.68.2 and later

If you are starting from scratch, you can follow the React Native CLI Quickstart https://reactnative.dev/docs/getting-started. For examples, once you have installed the React Native tools, you can run:
```shell
Expand Down Expand Up @@ -184,28 +184,6 @@ pod install
cd ..
```

#### 4.4 Fix dependency conflict between React Native and Onfido Android SDK

When using React Native version <= 0.64.0 there is a dependency conflict with okhttp3 on Android that can cause requests from outside of the Onfido SDK to fail. To fix this you can add the following code to `android/app/build.gradle`:

```
android {
configurations.all {
resolutionStrategy {
eachDependency { DependencyResolveDetails details ->
if (!details.requested.name.contains('onfido')) {
if (details.requested.group == 'com.squareup.okhttp3') {
details.useVersion '4.9.0'
}
}
}
}
}
}
```

This will allow the Onfido SDK to use okhttp3 v4.9.0 while still using the React Native version defined elsewhere in your app.

## Usage

You can launch the app with a call to `Onfido.start`. For example, once you have the `sdkTokenFromOnfidoServer`, your react component might look like this:
Expand Down
2 changes: 1 addition & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
// original location:
// - https://github.com/facebook/react-native/blob/0.58-stable/local-cli/templates/HelloWorld/android/app/build.gradle

def DEFAULT_COMPILE_SDK_VERSION = 31
def DEFAULT_COMPILE_SDK_VERSION = 32
def DEFAULT_MIN_SDK_VERSION = 21
def DEFAULT_TARGET_SDK_VERSION = 31

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
import com.onfido.android.sdk.capture.errors.EnterpriseFeaturesInvalidLogoCobrandingException;
import com.onfido.android.sdk.capture.ui.camera.face.FaceCaptureStep;
import com.onfido.android.sdk.capture.ui.camera.face.FaceCaptureVariant;
import com.onfido.android.sdk.capture.ui.camera.face.FaceCaptureVariantPhoto;
import com.onfido.android.sdk.capture.ui.camera.face.FaceCaptureVariantVideo;
import com.onfido.android.sdk.capture.ui.options.CaptureScreenStep;
import com.onfido.android.sdk.capture.ui.options.FlowStep;
import com.onfido.android.sdk.capture.utils.CountryCode;
Expand Down Expand Up @@ -228,7 +230,7 @@ public static FlowStep[] getFlowStepsFromConfig(final ReadableMap config) throws
String countryCodeString = captureDocument.getString("alpha2CountryCode");
CountryCode countryCodeEnum = findCountryCodeByAlpha2(countryCodeString);

if (countryCodeEnum == null) {
if (countryCodeEnum == null) {
System.err.println("Unexpected countryCode value: [" + countryCodeString + "]");
throw new Exception("Unexpected countryCode value.");
}
Expand All @@ -249,15 +251,15 @@ public static FlowStep[] getFlowStepsFromConfig(final ReadableMap config) throws
if (captureFaceTypeExists) {
final String captureFaceType = captureFace.getString("type");
if (captureFaceType.equals("PHOTO")) {
flowStepList.add(new FaceCaptureStep(FaceCaptureVariant.PHOTO));
flowStepList.add(new FaceCaptureStep(new FaceCaptureVariantPhoto()));
} else if (captureFaceType.equals("VIDEO")) {
flowStepList.add(new FaceCaptureStep(FaceCaptureVariant.VIDEO));
flowStepList.add(new FaceCaptureStep(new FaceCaptureVariantVideo()));
} else {
throw new Exception("Invalid face capture type. \"type\" must be VIDEO or PHOTO.");
}
} else {
// Default face capture type is photo.
flowStepList.add(new FaceCaptureStep(FaceCaptureVariant.PHOTO));
flowStepList.add(new FaceCaptureStep(new FaceCaptureVariantPhoto()));
}
}

Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@onfido/react-native-sdk",
"title": "React Native Onfido Sdk",
"version": "7.0.0",
"version": "7.0.1",
"description": "Onfido React Native SDK",
"main": "index.ts",
"scripts": {
Expand Down Expand Up @@ -63,8 +63,8 @@
"licenseFilename": "LICENSE",
"readmeFilename": "README.md",
"peerDependencies": {
"react": ">=16.8.1",
"react-native": ">=0.60.0-rc.0 <1.0.x"
"react": ">=17.0.0",
"react-native": ">=0.68.2 <1.0.x"
},
"devDependencies": {
"@babel/cli": "^7.10.5",
Expand Down

0 comments on commit 9903e93

Please sign in to comment.