Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade Onfido native sdk to 7.4.0 + fix allowed documents #14802

Merged
merged 3 commits into from
Mar 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cristipaval Would you mind checking these changes in this file? I was running into an error when building on android and these changes fixed it: #14802 (review)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey, this is fine. The error occurs because a library added as dependency to the App has android:supportsRtl="true" in its AndroidManifext.xml file. Or maybe the library doesn't have that property set at all, which means that the compiler sets the default value which is true. This is in conflict with our App settings (android:supportsRtl="false") and the line added (tools:replace="android:supportsRtl") tells the compiler to set our App's value to that property to all libraries when there is a conflict. This is fine, because the setting disables support for languages which are written from right to left and we don't support those languages yet.

package="com.expensify.chat">

<uses-permission android:name="android.permission.INTERNET" />
Expand All @@ -15,7 +16,8 @@
android:roundIcon="@mipmap/ic_launcher_round"
android:allowBackup="false"
android:resizeableActivity="false"
android:theme="@style/AppTheme">
android:theme="@style/AppTheme"
tools:replace="android:supportsRtl">

<activity
android:name=".MainActivity"
Expand Down
42 changes: 21 additions & 21 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -177,29 +177,29 @@ PODS:
- GoogleUtilities/Network (~> 7.4)
- "GoogleUtilities/NSData+zlib (~> 7.4)"
- nanopb (~> 2.30908.0)
- GoogleDataTransport (9.2.0):
- GoogleDataTransport (9.2.1):
- GoogleUtilities/Environment (~> 7.7)
- nanopb (< 2.30910.0, >= 2.30908.0)
- PromisesObjC (< 3.0, >= 1.2)
- GoogleUtilities/AppDelegateSwizzler (7.10.0):
- GoogleUtilities/AppDelegateSwizzler (7.11.0):
- GoogleUtilities/Environment
- GoogleUtilities/Logger
- GoogleUtilities/Network
- GoogleUtilities/Environment (7.10.0):
- GoogleUtilities/Environment (7.11.0):
- PromisesObjC (< 3.0, >= 1.2)
- GoogleUtilities/ISASwizzler (7.10.0)
- GoogleUtilities/Logger (7.10.0):
- GoogleUtilities/ISASwizzler (7.11.0)
- GoogleUtilities/Logger (7.11.0):
- GoogleUtilities/Environment
- GoogleUtilities/MethodSwizzler (7.10.0):
- GoogleUtilities/MethodSwizzler (7.11.0):
- GoogleUtilities/Logger
- GoogleUtilities/Network (7.10.0):
- GoogleUtilities/Network (7.11.0):
- GoogleUtilities/Logger
- "GoogleUtilities/NSData+zlib"
- GoogleUtilities/Reachability
- "GoogleUtilities/NSData+zlib (7.10.0)"
- GoogleUtilities/Reachability (7.10.0):
- "GoogleUtilities/NSData+zlib (7.11.0)"
- GoogleUtilities/Reachability (7.11.0):
- GoogleUtilities/Logger
- GoogleUtilities/UserDefaults (7.10.0):
- GoogleUtilities/UserDefaults (7.11.0):
- GoogleUtilities/Logger
- hermes-engine (0.70.4)
- libevent (2.1.12)
Expand All @@ -213,17 +213,17 @@ PODS:
- libwebp/demux
- libwebp/webp (1.2.4)
- lottie-ios (3.4.4)
- lottie-react-native (5.1.4):
- lottie-react-native (5.1.5):
- lottie-ios (~> 3.4.0)
- React-Core
- nanopb (2.30908.0):
- nanopb/decode (= 2.30908.0)
- nanopb/encode (= 2.30908.0)
- nanopb/decode (2.30908.0)
- nanopb/encode (2.30908.0)
- Onfido (27.0.0)
- onfido-react-native-sdk (7.0.1):
- Onfido (= 27.0.0)
- Onfido (27.4.0)
- onfido-react-native-sdk (7.4.0):
- Onfido (= 27.4.0)
- React
- OpenSSL-Universal (1.1.1100)
- Permission-Camera (3.6.1):
Expand All @@ -235,7 +235,7 @@ PODS:
- Permission-LocationWhenInUse (3.6.1):
- RNPermissions
- Plaid (2.5.1)
- PromisesObjC (2.1.1)
- PromisesObjC (2.2.0)
- RCT-Folly (2021.07.22.00):
- boost
- DoubleConversion
Expand Down Expand Up @@ -969,23 +969,23 @@ SPEC CHECKSUMS:
fmt: ff9d55029c625d3757ed641535fd4a75fedc7ce9
glog: 04b94705f318337d7ead9e6d17c019bd9b1f6b1b
GoogleAppMeasurement: 5ba1164e3c844ba84272555e916d0a6d3d977e91
GoogleDataTransport: 1c8145da7117bd68bbbed00cf304edb6a24de00f
GoogleUtilities: bad72cb363809015b1f7f19beb1f1cd23c589f95
GoogleDataTransport: ea169759df570f4e37bdee1623ec32a7e64e67c4
GoogleUtilities: c2bdc4cf2ce786c4d2e6b3bcfd599a25ca78f06f
hermes-engine: 3623325e0d0676a45fbc544d72c57dd79fce7446
libevent: 4049cae6c81cdb3654a443be001fb9bdceff7913
libwebp: f62cb61d0a484ba548448a4bd52aabf150ff6eef
lottie-ios: 8f97d3271e155c2d688875c29cd3c74908aef5f8
lottie-react-native: b702fab740cdb952a8e2354713d3beda63ff97b0
lottie-react-native: 3e722c63015fdb9c27638b0a77969fc412067c18
nanopb: a0ba3315591a9ae0a16a309ee504766e90db0c96
Onfido: bdbc3ed45598aa106ab2ea021d94e2e28c6b5be3
onfido-react-native-sdk: 5856e76fbfc0eb7b70b0f76fa1059830932a5c88
Onfido: e36f284b865adcf99d9c905590a64ac09d4a576b
onfido-react-native-sdk: 4ecde1a97435dcff9f00a878e3f8d1eb14fabbdc
OpenSSL-Universal: ebc357f1e6bc71fa463ccb2fe676756aff50e88c
Permission-Camera: bf6791b17c7f614b6826019fcfdcc286d3a107f6
Permission-LocationAccuracy: 76df17de5c6b8bc2eee34e61ee92cdd7a864c73d
Permission-LocationAlways: 8d99b025c9f73c696e0cdb367e42525f2e9a26f2
Permission-LocationWhenInUse: 3ba99e45c852763f730eabecec2870c2382b7bd4
Plaid: 6beadc0828cfd5396c5905931b9503493bbc139a
PromisesObjC: ab77feca74fa2823e7af4249b8326368e61014cb
PromisesObjC: 09985d6d70fbe7878040aa746d78236e6946d2ef
RCT-Folly: 0080d0a6ebf2577475bda044aa59e2ca1f909cda
RCTRequired: 329ead02b8edd20fb186d17745a9cadd5ce2922d
RCTTypeSafety: 698418021f8b47d82c058f3115c0026d1874a3ef
Expand Down
54 changes: 27 additions & 27 deletions package-lock.json

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

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@
"@formatjs/intl-numberformat": "^6.2.5",
"@formatjs/intl-pluralrules": "^4.0.13",
"@gorhom/portal": "^1.0.14",
"@oguzhnatly/react-native-image-manipulator": "github:Expensify/react-native-image-manipulator#5cdae3d4455b03a04c57f50be3863e2fe6c92c52",
"@onfido/react-native-sdk": "7.0.1",
"@oguzhnatly/react-native-image-manipulator": "github:Expensify/react-native-image-manipulator#c5f654fc9d0ad7cc5b89d50b34ecf8b0e3f4d050",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nkuoch Was there any reason to revert this to older commit? This introduces regression - #14751

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nkuoch is on leave till June. I'm not sure if there was a specific reason, it might've been something we accidentally overlooked 🤔 Was the solution to the regression to update the hash?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@MariaHCD yes, update hash

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because the author is on leave. We're hard to verify it. Based on the commit message, I think it's a accident:
278c1fe

Btw, with current package.json file, I can bump @oguzhnatly/react-native-image-manipulator to previous hash without any error.

"@onfido/react-native-sdk": "7.4.0",
"@react-native-async-storage/async-storage": "^1.17.10",
"@react-native-community/cameraroll": "git+https://github.com/react-native-cameraroll/react-native-cameraroll.git#3f0aed96db68e134f199171c7b06c1b4d6cb382b",
"@react-native-community/clipboard": "^1.5.1",
Expand All @@ -75,11 +75,11 @@
"jest-when": "^3.5.2",
"localforage": "^1.10.0",
"lodash": "4.17.21",
"lottie-react-native": "^5.1.4",
"lottie-react-native": "^5.1.5",
"metro-config": "^0.71.3",
"moment": "^2.29.4",
"moment-timezone": "^0.5.31",
"onfido-sdk-ui": "10.3.0",
"onfido-sdk-ui": "10.4.0",
"process": "^0.11.10",
"prop-types": "^15.7.2",
"pusher-js": "^7.0.6",
Expand Down
12 changes: 4 additions & 8 deletions src/components/Onfido/BaseOnfidoWeb.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,16 +63,12 @@ class Onfido extends React.Component {
options: {
useLiveDocumentCapture: true,
forceCrossDevice: true,
showCountrySelection: false,
hideCountrySelection: true,
country: 'USA',
uploadFallback: false,
documentTypes: {
driving_licence: {
country: null,
},
national_identity_card: {
country: null,
},
residence_permit: {
country: null,
country: 'USA',
},
passport: true,
},
Expand Down