Commit Graph

8 Commits

Author SHA1 Message Date
KiruthikaJeyashankar
68488f3f0c [INJIMOB-2381] fix compile and target SDK 34 is causing app crash in debug build (#1877)
* [INJIMOB-2381] update package.json and resolve dependencies for react 0.73.0

Signed-off-by: Abhishek Paul <paul.apaul.abhishek.ap@gmail.com>

* [INJIMOB-2381] setup for 0.73.6

Signed-off-by: Abhishek Paul <paul.apaul.abhishek.ap@gmail.com>

* [INJIMOB-2381] fix font & image not loading issue

changes include
- move common image assets to android & iOS folders
- update gradle version to 8.2
- add expo-font asset for Inter regular
- replace useFont with expo-font
- remove flipper (reason: 0.74 react native decoupled flipper)
- npm package updates
- close icon changed to close text in QRScanner.tsx

Signed-off-by: KiruthikaJeyashankar <kiruthikavjshankar@gmail.com>
Signed-off-by: Abhishek Paul <paul.apaul.abhishek.ap@gmail.com>

* [INJIMOB-2381] update android:mosip script as per updated react native version

Signed-off-by: KiruthikaJeyashankar <kiruthikavjshankar@gmail.com>

* [INJIMOB-2381] fix android build failure issue

Changes include:
- rename android assets folder as per convention
- remove unused biometrics dependency
- use env from react-native-dotenv as per module registered in babel config
- revert conversion of close icon to image in QRScanner component

Signed-off-by: KiruthikaJeyashankar <kiruthikavjshankar@gmail.com>

* [INJIMOB-2381] fix iOS build issue

Signed-off-by: KiruthikaJeyashankar <kiruthikavjshankar@gmail.com>

* [INJIMOB-2381] rm unused local images linking in adnroid

Signed-off-by: KiruthikaJeyashankar <kiruthikavjshankar@gmail.com>

* [INJIMOB-2381] fix splash screen not rendering issue in android

Issue: Local assets were not loaded via React Native Image component in android, to fix this @react-native/assets-registry has been added
Reference: https://github.com/expo/expo/issues/31240#issuecomment-2459049911

Other changes:
- remove usage of expo-image as we dont have any explicit usecase for expo-image and its unused

Signed-off-by: KiruthikaJeyashankar <kiruthikavjshankar@gmail.com>

* [INJIMOB-2381] rm unused intro slider image assets

Signed-off-by: KiruthikaJeyashankar <kiruthikavjshankar@gmail.com>

* [INJIMOB-2381] revert back using local font assets in android

Reason: Previously expo-font was used for fonts, to bring back the same compatiblity it is bought back

Signed-off-by: KiruthikaJeyashankar <kiruthikavjshankar@gmail.com>

* [INJIMOB-2381] use GestureHandlerRootView in root level to handle gestures

ref - https://docs.swmansion.com/react-native-gesture-handler/docs/1.x/#js

Signed-off-by: KiruthikaJeyashankar <kiruthikavjshankar@gmail.com>

* [INJIMOB-2381] remove custom assets and linking for images in iOS

Signed-off-by: KiruthikaJeyashankar <kiruthikavjshankar@gmail.com>

* [INJIMOB-2381] use default parameters instead of defaultProps

Reason: React 18 has marked defaultProps as deprecated and it is removed in React 19 version. To avoid the issue of deprated usage, its modified.

Signed-off-by: KiruthikaJeyashankar <kiruthikavjshankar@gmail.com>

* [INJIMOB-2381] remove unused terminal option in android build script

Signed-off-by: KiruthikaJeyashankar <kiruthikavjshankar@gmail.com>

* [INJIMOB-2381] remove font assets in android

Signed-off-by: KiruthikaJeyashankar <kiruthikavjshankar@gmail.com>

* [INJIMOB-2381] optimize import

Signed-off-by: KiruthikaJeyashankar <kiruthikavjshankar@gmail.com>

* [INJIMOB-2381] fix failing test

Signed-off-by: KiruthikaJeyashankar <kiruthikavjshankar@gmail.com>

* [INJIMOB-2381] set package.resolved version to 2

Signed-off-by: KiruthikaJeyashankar <kiruthikavjshankar@gmail.com>

* [INJIMOB-2381] fix setting of camera view in face scanner

Signed-off-by: KiruthikaJeyashankar <kiruthikavjshankar@gmail.com>

* [INJIMOB-2381] fix setting of camera view in face compare

Signed-off-by: KiruthikaJeyashankar <kiruthikavjshankar@gmail.com>

* [INJIMOB-2381] remove flipper config file

Signed-off-by: KiruthikaJeyashankar <kiruthikavjshankar@gmail.com>

* [INJIMOB-2381] remove unused debug logs

Signed-off-by: KiruthikaJeyashankar <kiruthikavjshankar@gmail.com>

* [INJIMOB-2381] refactor use component instead of type

Signed-off-by: KiruthikaJeyashankar <kiruthikavjshankar@gmail.com>

* [INJIMOB-2381] refactor use GestureHandlerRootView only on root level

Signed-off-by: KiruthikaJeyashankar <kiruthikavjshankar@gmail.com>

* [INJIMOB-2381] refactor remove unused config linking of font assets

Signed-off-by: KiruthikaJeyashankar <kiruthikavjshankar@gmail.com>

* [INJIMOB-2381] refactor remove unused image assets

Signed-off-by: KiruthikaJeyashankar <kiruthikavjshankar@gmail.com>

* [INJIMOB-2381] fix camera persmission issue in QRScanner

use expo-camera to request and getstatus of camera permission instead of expo-barcode-scanner to avoid multiple re-renders of scan screen in flow of camera permission denial

Signed-off-by: KiruthikaJeyashankar <kiruthikavjshankar@gmail.com>

* [INJIMOB-2381] remove package expo-barcode-scanner

expo-barcode-scanner is deprecated and its suggested to use expo-camera to handle the scanning flows. The existing bar-code-scanner implementations have been replaced with expo-camera.

Signed-off-by: KiruthikaJeyashankar <kiruthikavjshankar@gmail.com>

* [INJIMOB-2381] use extracted enums instead of legacy expo-camera

Signed-off-by: KiruthikaJeyashankar <kiruthikavjshankar@gmail.com>

* [INJIMOB-2381] remove patch for react-native-0.71.8

Signed-off-by: KiruthikaJeyashankar <kiruthikavjshankar@gmail.com>

* [INJIMOB-2381] revert date-fs version to 2.28.0

date-fns is not supporting filipino langauge, so we are maintaining patch for that. The patch created is for version 2.28.0 and updating the version of date-fns is causing conflicts in patch application if updated as well. To avoid this issue, version is kept as 2.28.0

Signed-off-by: KiruthikaJeyashankar <kiruthikavjshankar@gmail.com>

* [INJIMOB-2381] update readme

Signed-off-by: KiruthikaJeyashankar <kiruthikavjshankar@gmail.com>

* [INJIMOB-2381] remove usage of legacy expo-camera in getting image type

Other changes
- remove resolutions block from package.json
- sync pbxproj

Signed-off-by: KiruthikaJeyashankar <kiruthikavjshankar@gmail.com>

* [INJIMOB-2381] add active prop to expo-camera as per suggestions

expo-camera suggests "Only one Camera preview can be active at any given time. If you have multiple screens in your app, you should unmount Camera components whenever a screen is unfocused.". To handle this active prop is used which is set to false on unMount of the component whenever rendering Camera from expo-camera

Signed-off-by: KiruthikaJeyashankar <kiruthikavjshankar@gmail.com>

---------

Signed-off-by: Abhishek Paul <paul.apaul.abhishek.ap@gmail.com>
Signed-off-by: KiruthikaJeyashankar <kiruthikavjshankar@gmail.com>
Signed-off-by: adityankannan-tw <109274996+adityankannan-tw@users.noreply.github.com>
Co-authored-by: Abhishek Paul <paul.apaul.abhishek.ap@gmail.com>
Co-authored-by: adityankannan-tw <109274996+adityankannan-tw@users.noreply.github.com>
2025-04-10 14:37:41 +05:30
Harsh Vardhan
c05408413d [INJI-314] [INJI-900] add jest testing config, mocks and sample unit tests for Inji (#1340)
* [INJI-314] initial commit

Signed-off-by: Sri Kanth Kola <srikanthsri7447@gmail.com>

* [INJI-314] add WIP ut stuff

Signed-off-by: Harsh Vardhan <harsh59v@gmail.com>

* [INJIMOB-314] fix tsconfig for project type

Signed-off-by: Harsh Vardhan <harsh59v@gmail.com>

* [INJIMOB-314] kludge - skip checking types during unit tests

* mock image imports globally
* enable tests to run from any dir

Signed-off-by: Harsh Vardhan <harsh59v@gmail.com>

* [INJIMOB-314]: mocked modules

Signed-off-by: srikanth716 <srikanthsri7447@gmail.com>

* [INJIMOB-314]: mock react-native-google-signin

Signed-off-by: srikanth716 <srikanthsri7447@gmail.com>

* [INJIMOB-314]: use defined mock from google-signin lib

other details:
- mock base58.., rn-linear-gradient, expo-camera
- add @react-native/assets-registry to make jest-expo babel preset work

Signed-off-by: Harsh Vardhan <harsh59v@gmail.com>

* [INJIMOB-314] reorganise global const mocks into jest's setupFiles

Co-authored-by: srikanth716 <srikanthsri7447@gmail.com>
Signed-off-by: Harsh Vardhan <harsh59v@gmail.com>

* [INJIMOB-900] write tests for ActivityLogEvent

* init relevant mocks
* remove redundant global mocks from test files

Signed-off-by: Harsh Vardhan <harsh59v@gmail.com>

* [INJIMOB-900] fixup mocks of mmkv, zip-archive, rnfs

Signed-off-by: Harsh Vardhan <harsh59v@gmail.com>

* [INJIMOB-900]: write unit test for commonUtil

Signed-off-by: srikanth716 <srikanthsri7447@gmail.com>

* [INJIMOB-900]: write unit test for commonUtil

Signed-off-by: srikanth716 <srikanthsri7447@gmail.com>

* [INJIMOB-900]: sample unit test for settingsScreen

Signed-off-by: srikanth716 <srikanthsri7447@gmail.com>

* [INJIMOB-900] add SettingScreen test

Signed-off-by: Harsh Vardhan <harsh59v@gmail.com>

* [INJIMOB-900] update sample tests for commonUtil

Signed-off-by: Harsh Vardhan <harsh59v@gmail.com>

* [INJIMOB-900]: refactoring the settingsScreen test for Android and IOS

Signed-off-by: srikanth716 <srikanthsri7447@gmail.com>

* [INJIMOB-900] update test snapshots and add kludge in auth for testing

kludge: auth state machine now exports a selector with optional fields
as state machine isn't running in a test environment

Co-authored-by: srikanth716 <srikanthsri7447@gmail.com>
Signed-off-by: Harsh Vardhan <harsh59v@gmail.com>

* [INJIMOB-900]: snapshot test to settings screen

Signed-off-by: srikanth716 <srikanthsri7447@gmail.com>

* [INJIMOB-900] update mocks for testing and ACK reviews

Signed-off-by: Harsh Vardhan <harsh59v@gmail.com>

* [INJIMOB-900] downgrade expo to match compatibility matrix

Signed-off-by: Harsh Vardhan <harsh59v@gmail.com>

* [INJIMOB-900] upgrade expo to 49 to build the iOS app(kludge)

Signed-off-by: Harsh Vardhan <harsh59v@gmail.com>

* [INJIMOB-900] configure react-native-vector-icons as per README

Signed-off-by: Harsh Vardhan <harsh59v@gmail.com>

---------

Signed-off-by: Sri Kanth Kola <srikanthsri7447@gmail.com>
Signed-off-by: Harsh Vardhan <harsh59v@gmail.com>
Signed-off-by: srikanth716 <srikanthsri7447@gmail.com>
Co-authored-by: Sri Kanth Kola <srikanthsri7447@gmail.com>
2024-04-02 11:22:01 +05:30
KiruthikaJeyashankar
1084dc1a43 [INJIMOB-918] avoid logging sensitive data (#1333)
* [INJIMOB-918] log state machines only in dev mode

Signed-off-by: KiruthikaJeyashankar <81218987+KiruthikaJeyashankar@users.noreply.github.com>

* [INJIMOB-918] remove unused logs & modify logs

Signed-off-by: KiruthikaJeyashankar <81218987+KiruthikaJeyashankar@users.noreply.github.com>

* [INJIMOB-918] remove console logs before bindling

ref - https://reactnative.dev/docs/performance#using-consolelog-statements

Signed-off-by: KiruthikaJeyashankar <81218987+KiruthikaJeyashankar@users.noreply.github.com>

* [INJIMOB-918] change log levels of existing console logs

Signed-off-by: KiruthikaJeyashankar <81218987+KiruthikaJeyashankar@users.noreply.github.com>

* [INJIMOB-918] change let to const as they are not re-assigned

Signed-off-by: KiruthikaJeyashankar <81218987+KiruthikaJeyashankar@users.noreply.github.com>

---------

Signed-off-by: KiruthikaJeyashankar <81218987+KiruthikaJeyashankar@users.noreply.github.com>
2024-03-13 17:08:34 +05:30
Paolo Miguel de Leon
d40f5bf189 build: add env step to custom android build 2022-09-06 15:36:11 +08:00
Paolo Miguel de Leon
c2dd086ce8 build: add dotenv 2022-09-06 14:33:53 +08:00
pmigueld
3743b12b5c feat: add VC verification 2022-04-05 10:49:18 +08:00
Arnelle Balane
369899efd9 Display credits markdown even with disabled android:usesCleartextTraffic 2022-03-07 13:40:58 +08:00
Paolo Miguel de Leon
b5be632225 version 0.2.0 2022-02-15 10:26:25 +07:00