* refactor(INJI-449): remove unused dependencies Dependencies removed 1. expo-status-bar 2. @expo-google-fonts/poppins 3. react-native-simple-markdown 4. react-native-swipe-gestures DevDependencies removed 1. @react-native/metro-config (removed as we already have @expo/metro-config dependency used) 2. metro-react-native-babel-preset 3. @types/react-test-renderer 4. react-test-renderer Signed-off-by: Kiruthika Jeyashankar <81218987+KiruthikaJeyashankar@users.noreply.github.com> * refactor(INJI-449): update expo related packages and crypto-js Signed-off-by: Kiruthika Jeyashankar <81218987+KiruthikaJeyashankar@users.noreply.github.com> * refactor(INJI-449): update transitive dependency of expo-updates package plist package is a transitive dependency of expo-updates which had vulnerability - Prototype pollution vulnerability via .parse() in Plist before v3.0.4 allows attackers to cause a Denial of Service (DoS) and may lead to remote code execution. Thus this package was updated to fix vulnerability Signed-off-by: Kiruthika Jeyashankar <81218987+KiruthikaJeyashankar@users.noreply.github.com> * refactor(INJI-449): update axios dependency of telemetry-sdk to 1.6.0 Since the package axios(1.5.0) has vulnerability - Cross-Site Request Forgery (CSRF), it is updated to 1.6.0 Signed-off-by: Kiruthika Jeyashankar <81218987+KiruthikaJeyashankar@users.noreply.github.com> * fix(INJI-449): vulnerablity issue with @digitalbazaar/rsa-verification-key-2018 override the node-forge dependency of the package - @digitalbazaar/rsa-verification-key-2018 as it has the high severity with CVE count 13 Signed-off-by: Kiruthika Jeyashankar <81218987+KiruthikaJeyashankar@users.noreply.github.com> * revert(INJI-449): downgrade crypto-js to 3.3.0 from 4.x.x version Signed-off-by: Kiruthika Jeyashankar <81218987+KiruthikaJeyashankar@users.noreply.github.com> * refactor(INJI-449): use expo-splash-screen instead of expo-app-loading expo-app-loading package is deprecated and it is suggested to replace it with expo-splash-screen Signed-off-by: Kiruthika Jeyashankar <81218987+KiruthikaJeyashankar@users.noreply.github.com> * refactor(INJI-449): optimize time taken to hide splash screen Co-authored-by: Sreenadh S <32409698+sree96@users.noreply.github.com> Signed-off-by: Kiruthika Jeyashankar <81218987+KiruthikaJeyashankar@users.noreply.github.com> * refactor(INJI-449): change appEntry to index js Change appEntry to index.js file since react-native-url-polyfill/auto is imported to avoid URL error. appEntry is required for expo package update Signed-off-by: Kiruthika Jeyashankar <81218987+KiruthikaJeyashankar@users.noreply.github.com> * refactor(INJI-559): update podfile.lock Signed-off-by: Kiruthika Jeyashankar <81218987+KiruthikaJeyashankar@users.noreply.github.com> * refactor(INJI-449): optimize import Signed-off-by: Kiruthika Jeyashankar <81218987+KiruthikaJeyashankar@users.noreply.github.com> --------- Signed-off-by: Kiruthika Jeyashankar <81218987+KiruthikaJeyashankar@users.noreply.github.com>
inji
MOSIP citizen app.
Dependencies
Be sure to have the following build tools installed before proceeding:
Generate keystore for APK signing
# Generate and use Debug keystore for development and testing purposes
keytool \
-genkey -v \
-storetype PKCS12 \
-keyalg RSA \
-keysize 2048 \
-validity 10000 \
-storepass 'android' \
-keypass 'android' \
-alias androiddebugkey \
-keystore android/app/debug.keystore \
-dname "CN=io.mosip.residentapp,OU=,O=,L=,S=,C=US"
# Generate and use Release keystore for Publishing to Play store
keytool \
-genkey -v \
-storetype PKCS12 \
-keyalg RSA \
-keysize 2048 \
-validity 10000 \
-storepass '<USE-YOUR-RELEASE-PASSWORD-HERE>' \
-keypass '<USE-YOUR-RELEASE-PASSWORD-HERE>' \
-alias androidreleasekey \
-keystore android/app/release.keystore \
-dname "CN=io.mosip.residentapp,OU=,O=,L=,S=,C=US"
Running the app
Prepare environment
Create a .env.local file using .env as your template:
MIMOTO_HOST=
And android/local.properties:
More info here: Setup Google Nearby Messages in React
Android
# install all dependencies
npm install
# run Inji Newlogic directly to connected emulator or device (Default)
npm run android:newlogic
# run Inji Mosip directly to connected emulator or device
npm run android:mosip
# run Inji Philippines directly to connected emulator or device
npm run android:ph
iOS
# install all dependencies
npm install
npx pod-install
# run Metro bundler in the background
npm start
# run Inji app directly to a connected device
npm run ios -- --device
Developing Android
Build via Android Studio
The app is available in this repository's frontend/android directory. Open this directory in Android Studio (version 4.1 and above) and the app can be built and run from there.
More info here: Build your app using Android Studio
Build via command line
You need Android SDK CLI to build APK.
# 1. Install dependencies
npm install
# 2. Setup the environment variables for the keystore
# Debug keystore
export DEBUG_KEYSTORE_ALIAS=androiddebugkey
export DEBUG_KEYSTORE_PASSWORD=android
# Release keystore
export RELEASE_KEYSTORE_ALIAS=androidreleasekey
export RELEASE_KEYSTORE_PASSWORD=<USE-YOUR-RELEASE-PASSWORD-HERE>
# https://hostname/residentmobileapp is the Mimoto service url
export BACKEND_SERVICE_URL=https://hostname/residentmobileapp
# Use one of following command to build the flavor you need.
# Build for Mosip Philippines test
npm run build:android:ph
# Build for Newlogic test
npm run build:android:newlogic
# Build for MOSIP test
npm run build:android:mosip
More info here: Build your app from the command line
Developing iOS
Build for TestFlight
- Install all dependencies
npm installnpx pod-install
- Open the
ios/directory in XCode - Set the build target to "Any iOS device (arm64)"
- Use an Apple Developer account that can provision builds for release/TestFlight
-
Don't forget to bump the version number when creating an archive
-
Open the Product menu and from there click Archive
-
Once done you can follow the dialog wizard to distribute the app to TestFlight
- Go to your App Store Connect dashboard to manage the newly-uploaded build.
More info here:
- React Native - Publishing to the App Store
- Apple Developer - Distributing Your App for Beta Testing and Releases
View the complete DB :
- Connect your phone to the laptop and open Android Studio.
- On the bottom right vertical tab you will find a
Device File Explorerbutton. Click on it and select you phone. - Navigate to
data -> data -> io.mosip.residentapp ->databases. You will find a file namedRKStoragein it. Download it. - Download DB Browser for SQLite .
- Open the file in this application. Click on
Browse Databutton and selectcatalystLocalStoragetable. Now you should be able to view the entire DB of Inji.
Credits
Credits listed here
Congratulations! 🎉
You've successfully run and modified your React Native App. 🥳
Now what?
- If you want to add this new React Native code to an existing application, check out the Integration guide.
- If you're curious to learn more about React Native, check out the Introduction to React Native.
Troubleshooting
If you can't get this to work, see the Troubleshooting page.
Learn More
To learn more about React Native, take a look at the following resources:
- React Native Website - learn more about React Native.
- Getting Started - an overview of React Native and how setup your environment.
- Learn the Basics - a guided tour of the React Native basics.
- Blog - read the latest official React Native Blog posts.
@facebook/react-native- the Open Source; GitHub repository for React Native.

