Skip to content

Commit

Permalink
v8.2.0 release
Browse files Browse the repository at this point in the history
  • Loading branch information
RN SDK Release User committed Apr 17, 2023
1 parent 4f99946 commit 46a04e0
Show file tree
Hide file tree
Showing 17 changed files with 89 additions and 30 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [8.2.0] - 2023-04-12

### Changed:
- Public: Updated underlying Onfido native SDKs versions:
- iOS 28.3.x (up from 28.1.x)
- Android 16.3.x (up from 16.1.x)

## [8.1.0] - 2023-03-06

### Changed:
Expand Down
33 changes: 33 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,39 @@ android {
```
</details>

</br>


NFC dependencies are not included in the SDK to avoid increasing the SDK size when the NFC feature is disabled. To use the NFC feature, you need to include the following dependencies (with the specified versions) in your build script:

```gradle
implementation "net.sf.scuba:scuba-sc-android:0.0.23"
implementation "org.jmrtd:jmrtd:0.7.34"
implementation "com.madgag.spongycastle:prov:1.58.0.0"
```

You also need to add the following Proguard rules to your `proguard-rules.pro` file:

```
-keep class org.jmrtd.** { *; }
-keep class net.sf.scuba.** {*;}
-keep class org.bouncycastle.** {*;}
-keep class org.spongycastle.** {*;}
-keep class org.ejbca.** {*;}
-dontwarn kotlin.time.jdk8.DurationConversionsJDK8Kt
-dontwarn org.ejbca.**
-dontwarn org.bouncycastle.**
-dontwarn org.spongycastle.**
-dontwarn module-info
-dontwarn org.jmrtd.**
-dontwarn net.sf.scuba.**
```


</br>

#### 4.3 Update your iOS configuration files

Change `ios/Podfile` to use version 11:
Expand Down
8 changes: 6 additions & 2 deletions SampleApp/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,12 @@ export default class App extends Component {
render() {
return (
<View style={styles.container}>
<Text style={styles.welcome}>{this.state.title}</Text>
<Text style={styles.instructions}>{this.state.subtitle}</Text>
<Text testID="firstName" style={styles.welcome}>
{this.state.title}
</Text>
<Text testID="lastName" style={styles.instructions}>
{this.state.subtitle}
</Text>
<Button title="Launch" onPress={() => this.startSDK()} />
{this.state.sdkFlowComplete ? (
<Redirect to={`/finish/${this.state.status}/${this.state.message}`} />
Expand Down
6 changes: 5 additions & 1 deletion SampleApp/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,11 @@ dependencies {
}

androidTestImplementation('com.wix:detox:+') { transitive = true }
androidTestImplementation 'junit:junit:4.13.2'

// To use the JUnit Extension APIs
androidTestImplementation "androidx.test.ext:junit:1.1.5"
// Kotlin extensions for androidx.test.ext.junit
androidTestImplementation "androidx.test.ext:junit-ktx:1.1.5"
}

// Run this once to be able to run the application with BUCK
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import androidx.test.rule.ActivityTestRule;

import com.wix.detox.Detox;
import com.wix.detox.config.DetoxConfig;

import org.junit.Rule;
import org.junit.Test;
Expand All @@ -18,7 +19,12 @@ public class DetoxTest {
public ActivityTestRule<MainActivity> mActivityRule = new ActivityTestRule<>(MainActivity.class, false, false);

@Test
public void runDetoxTests() throws InterruptedException {
Detox.runTests(mActivityRule);
public void runDetoxTests() {
DetoxConfig detoxConfig = new DetoxConfig();
detoxConfig.idlePolicyConfig.masterTimeoutSec = 90;
detoxConfig.idlePolicyConfig.idleResourceTimeoutSec = 60;
detoxConfig.rnContextLoadTimeoutSec = (BuildConfig.DEBUG ? 180 : 60);

Detox.runTests(mActivityRule, detoxConfig);
}
}
8 changes: 0 additions & 8 deletions SampleApp/android/app/src/debug/AndroidManifest.xml

This file was deleted.

7 changes: 5 additions & 2 deletions SampleApp/android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.sampleapp">
xmlns:tools="http://schemas.android.com/tools"
package="com.sampleapp">

<uses-permission android:name="android.permission.INTERNET" />

Expand All @@ -9,6 +10,8 @@
android:icon="@mipmap/ic_launcher"
android:roundIcon="@mipmap/ic_launcher_round"
android:allowBackup="false"
android:exported="true"
android:networkSecurityConfig="@xml/network_security_config" tools:targetApi="24"
android:theme="@style/AppTheme"
>
<activity
Expand All @@ -22,7 +25,7 @@
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name="com.facebook.react.devsupport.DevSettingsActivity" />
<activity android:name="com.facebook.react.devsupport.DevSettingsActivity" android:exported="false" />
</application>

</manifest>
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
<domain-config cleartextTrafficPermitted="true">
<domain includeSubdomains="true">10.0.2.2</domain>
<domain includeSubdomains="true">localhost</domain>
</domain-config>
</network-security-config>
7 changes: 7 additions & 0 deletions SampleApp/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,11 @@ allprojects {
maven { url "$rootDir/../node_modules/detox/Detox-android" }
maven { url "https://maven.google.com" }
}
def REACT_NATIVE_VERSION = new File(['node', '--print',"JSON.parse(require('fs').readFileSync(require.resolve('react-native/package.json'), 'utf-8')).version"].execute(null, rootDir).text.trim())

configurations.all {
resolutionStrategy {
force "com.facebook.react:react-native:" + REACT_NATIVE_VERSION
}
}
}
8 changes: 2 additions & 6 deletions SampleApp/e2eAndroid/sampleAppFlow.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,8 @@ describe('Android Sample App flow', () => {
});

it('should complete the document and face flow on Android successfully', async () => {
await element(by.type('android.widget.EditText'))
.atIndex(0)
.typeText(textProps.firstName);
await element(by.type('android.widget.EditText'))
.atIndex(1)
.typeText(textProps.lastName);
await element(by.id('firstName')).atIndex(0).typeText(textProps.firstName);
await element(by.id('lastName')).atIndex(1).typeText(textProps.lastName);
await element(by.text('Start SDK')).tap();
await element(by.text('LAUNCH')).tap();
await element(by.text('Start')).tap();
Expand Down
4 changes: 2 additions & 2 deletions SampleApp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,13 @@
"binaryPath": "android/app/build/outputs/apk/debug/app-debug.apk",
"build": "cd android && ./gradlew assembleDebug assembleAndroidTest -DtestBuildType=debug && cd ..",
"type": "android.emulator",
"name": "Pixel_API_28_AOSP"
"name": "emulator"
},
"android.emu.release.sampleapp": {
"binaryPath": "android/app/build/outputs/apk/release/app-release-bitrise-signed.apk",
"build": "cd android && ./gradlew assembleRelease assembleAndroidTest -DtestBuildType=release && cd ..",
"type": "android.emulator",
"name": "Pixel_API_28_AOSP"
"name": "emulator"
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
def DEFAULT_COMPILE_SDK_VERSION = 32
def DEFAULT_MIN_SDK_VERSION = 21
def DEFAULT_TARGET_SDK_VERSION = 31
def NATIVE_ANDROID_SDK_VERSION = "16.1.+"
def NATIVE_ANDROID_SDK_VERSION = "16.3.+"

def safeExtGet(prop, fallback) {
rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
Expand Down
2 changes: 1 addition & 1 deletion android/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@

<meta-data
android:name="onfido_integration_version"
android:value="8.1.1" />
android:value="8.2.0" />
</application>
</manifest>
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,8 @@ public void shouldResolveWithDocumentSuccessfully() throws Exception {
String docBackId = "docBackId123";
String nfcMediaUUID = "docNfcMediaId123";
Document documentMock = PowerMockito.mock(Document.class);
when(documentMock.getFront()).thenReturn(new DocumentSide(docFrontId, DocSide.FRONT, DocumentType.DRIVING_LICENCE));
when(documentMock.getBack()).thenReturn(new DocumentSide(docBackId, DocSide.BACK, DocumentType.DRIVING_LICENCE));
when(documentMock.getFront()).thenReturn(new DocumentSide(docFrontId, DocSide.FRONT, DocumentType.DRIVING_LICENCE, false));
when(documentMock.getBack()).thenReturn(new DocumentSide(docBackId, DocSide.BACK, DocumentType.DRIVING_LICENCE, false));
when(documentMock.getNfcMediaUUID()).thenReturn(nfcMediaUUID);
when(capturesMock.getDocument()).thenReturn(documentMock);

Expand Down
2 changes: 1 addition & 1 deletion ios/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ require_relative '../node_modules/@react-native-community/cli-platform-ios/nativ
platform :ios, '11.0'

target 'OnfidoSdk' do
pod 'Onfido', '~> 28.1.0'
pod 'Onfido', '~> 28.3.0'

config = use_native_modules!
use_react_native!(
Expand Down
2 changes: 1 addition & 1 deletion onfido-react-native-sdk.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@ Pod::Spec.new do |s|
s.requires_arc = true

s.dependency "React"
s.dependency "Onfido", "~> 28.1.0"
s.dependency "Onfido", "~> 28.3.0"
end
2 changes: 1 addition & 1 deletion 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": "8.1.1",
"version": "8.2.0",
"description": "Onfido React Native SDK",
"main": "index.ts",
"scripts": {
Expand Down

0 comments on commit 46a04e0

Please sign in to comment.