From 1fa1196eb30805baf9ab8af03586675e0ab97bba Mon Sep 17 00:00:00 2001 From: DominicTobias Date: Thu, 20 Oct 2022 13:26:37 +0100 Subject: [PATCH] Note on preventing Android crash with proguard/dexguard enabled Hi you have a few issues about Android crashes that are likely due to this e.g. https://github.com/onfido/react-native-sdk/issues/8 https://github.com/onfido/react-native-sdk/issues/30 --- README.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/README.md b/README.md index 4124ffc..e639adb 100644 --- a/README.md +++ b/README.md @@ -454,6 +454,16 @@ Below is a list of known differences in expected behavior between the Onfido And * Documents with the type `passport` uploaded through the iOS SDK will have the `side` attribute set to `null`, while those uploaded via Android will have `side` as `front`. +**Proguard / Dexguard** + +If you have enabled either of these then disable them for the Onfido module to prevent a crash in Android when starting the camera: + +`proguard-rules.pro` +Add `-keep class com.onfido.reactnative.sdk.** { *; }` + +`dexguard-project.txt` +Add `-keep class com.onfido.reactnative.sdk.** { *; }` + ### Support Please open an issue through [GitHub](https://github.com/onfido/onfido-react-native-sdk/issues). Please be as detailed as you can. Remember **not** to submit your token in the issue. Also check the closed issues to check whether it has been previously raised and answered.