Skip to content

Commit

Permalink
Merge pull request #36783 from mkhutornyi/fix-35519
Browse files Browse the repository at this point in the history
bump onfido native sdk version
  • Loading branch information
Hayata Suenaga authored Feb 20, 2024
2 parents 669ac33 + 1b83fba commit 9c4c4ac
Show file tree
Hide file tree
Showing 7 changed files with 62 additions and 42 deletions.
15 changes: 15 additions & 0 deletions android/app/src/main/java/com/expensify/chat/MainApplication.kt
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
package com.expensify.chat

import android.app.ActivityManager
import android.content.res.Configuration
import android.database.CursorWindow
import android.os.Process
import androidx.multidex.MultiDexApplication
import com.expensify.chat.bootsplash.BootSplashPackage
import com.facebook.react.PackageList
Expand Down Expand Up @@ -40,6 +42,10 @@ class MainApplication : MultiDexApplication(), ReactApplication {
override fun onCreate() {
super.onCreate()

if (isOnfidoProcess()) {
return
}

SoLoader.init(this, /* native exopackage */false)
if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) {
// If you opted-in for the New Architecture, we load the native entry point for this app.
Expand Down Expand Up @@ -73,4 +79,13 @@ class MainApplication : MultiDexApplication(), ReactApplication {
super.onConfigurationChanged(newConfig)
ApplicationLifecycleDispatcher.onConfigurationChanged(this, newConfig)
}

private fun isOnfidoProcess(): Boolean {
val pid = Process.myPid()
val manager = this.getSystemService(ACTIVITY_SERVICE) as ActivityManager

return manager.runningAppProcesses.any {
it.pid == pid && it.processName.endsWith(":onfido_process")
}
}
}
7 changes: 7 additions & 0 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,13 @@ allprojects {
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())
force "com.facebook.react:react-native:" + REACT_NATIVE_VERSION
force "com.facebook.react:hermes-engine:" + REACT_NATIVE_VERSION

eachDependency { dependency ->
if (dependency.requested.group == 'org.bouncycastle') {
println dependency.requested.module
dependency.useTarget 'org.bouncycastle:bcprov-jdk15to18:1.71'
}
}
}
}
repositories {
Expand Down
10 changes: 5 additions & 5 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -280,9 +280,9 @@ PODS:
- nanopb/encode (= 2.30908.0)
- nanopb/decode (2.30908.0)
- nanopb/encode (2.30908.0)
- Onfido (28.3.1)
- onfido-react-native-sdk (8.3.0):
- Onfido (~> 28.3.0)
- Onfido (29.6.0)
- onfido-react-native-sdk (10.6.0):
- Onfido (~> 29.6.0)
- React
- OpenSSL-Universal (1.1.1100)
- Plaid (4.7.0)
Expand Down Expand Up @@ -1903,8 +1903,8 @@ SPEC CHECKSUMS:
MapboxMaps: cbb38845a9bf49b124f0e937975d560a4e01894e
MapboxMobileEvents: de50b3a4de180dd129c326e09cd12c8adaaa46d6
nanopb: a0ba3315591a9ae0a16a309ee504766e90db0c96
Onfido: 564f60c39819635ec5b549285a1eec278cc9ba67
onfido-react-native-sdk: b346a620af5669f9fecb6dc3052314a35a94ad9f
Onfido: c52e797b10cc9e6d29ba91996cb62e501000bfdd
onfido-react-native-sdk: 4e7f0a7a986ed93cb906d2e0b67a6aab9202de0b
OpenSSL-Universal: ebc357f1e6bc71fa463ccb2fe676756aff50e88c
Plaid: 431ef9be5314a1345efb451bc5e6b067bfb3b4c6
PromisesObjC: c50d2056b5253dadbd6c2bea79b0674bd5a52fa4
Expand Down
21 changes: 16 additions & 5 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
"@kie/act-js": "^2.6.0",
"@kie/mock-github": "^1.0.0",
"@oguzhnatly/react-native-image-manipulator": "github:Expensify/react-native-image-manipulator#5cdae3d4455b03a04c57f50be3863e2fe6c92c52",
"@onfido/react-native-sdk": "8.3.0",
"@onfido/react-native-sdk": "10.6.0",
"@react-native-async-storage/async-storage": "1.21.0",
"@react-native-camera-roll/camera-roll": "7.4.0",
"@react-native-clipboard/clipboard": "^1.13.2",
Expand Down
18 changes: 18 additions & 0 deletions patches/@onfido+react-native-sdk+10.6.0.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
diff --git a/node_modules/@onfido/react-native-sdk/android/build.gradle b/node_modules/@onfido/react-native-sdk/android/build.gradle
index 33a4229..1720bef 100644
--- a/node_modules/@onfido/react-native-sdk/android/build.gradle
+++ b/node_modules/@onfido/react-native-sdk/android/build.gradle
@@ -84,6 +84,13 @@ android {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
+
+ publishing {
+ singleVariant('release') {
+ withSourcesJar()
+ withJavadocJar()
+ }
+ }
}

repositories {
31 changes: 0 additions & 31 deletions patches/@onfido+react-native-sdk+8.3.0.patch

This file was deleted.

0 comments on commit 9c4c4ac

Please sign in to comment.