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 2 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
14 changes: 7 additions & 7 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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 Down Expand Up @@ -975,10 +975,10 @@ SPEC CHECKSUMS:
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
Expand Down
30 changes: 15 additions & 15 deletions package-lock.json

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

6 changes: 3 additions & 3 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 Down Expand Up @@ -79,7 +79,7 @@
"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