Inji
GitHubCommunityWhat's NewChatBot
  • Inji
    • Try It Out
      • Using Mock Data
    • Use case
    • Resources
    • Roadmap
      • Roadmap 2025
      • Roadmap 2024
    • Supported Integrations
      • MOSIP
    • Project Governance
    • Contribution
      • Code Contribution
      • Code of Conduct
    • GenderMag
    • License
    • Setup
      • Infrastructure Requirements
      • Deploy
  • Inji Wallet
    • Inji Mobile
      • Overview
        • Features
      • Develop
        • Architecture
        • Technical Stack
        • Components
        • Integration Guides
          • Face Match
          • Secure Keystore
          • Tuvali
            • Permissions & Requirements
            • Tuvali API Documentation
          • BLE Verifier
          • PixelPass
          • Telemetry
          • VCI-Client
          • OpenID4VP
        • Specifications
          • Face SDK Specifications
        • Backend Services
          • Mimoto
          • eSignet
          • Inji Certify
        • Customizations
          • Workflow customization
          • UI customization
          • Locale customization
          • Configuration
          • Credential Providers
      • Test
        • Try It Out
          • Inji Mobile - Collab Guide
        • Workflow
        • End User Guide
      • Setup
        • Local Setup
      • Releases
        • Version 0.16.0
          • Test Report
        • Version 0.15.1
          • Test Report
        • Version 0.15.0
          • Test Report
        • Version 0.14.1
          • Test Report
        • Version 0.14.0
          • Test Report
        • Version 0.13.1
          • Test Report
        • Version 0.13.0
          • Test Report
        • Version 0.12.0
          • Test Report
        • Version 0.11.0-Inji
          • Test Report
        • Version 0.11.0
        • Version DP2
          • Test Report
        • Version 0.10.0
          • Test Report
        • Version DP1
        • Version 0.9.1
          • Test Report
        • Version 0.9.0
          • Test Report
    • Inji Web
      • Overview
        • Features
      • Develop
        • Architecture
        • Technology Stack
        • Backend services
          • Mimoto - BFF
          • eSignet - Authentication Layer
          • Configurations
        • Customizations
          • UI Customizations
          • Locale Customizations
          • Credential Providers
          • Customize VC PDF Template
        • Supported Browsers
      • Test
        • Try It Out
          • Inji Web - Collab Guide
        • Workflow
        • End User Guide
      • Setup
        • Local setup
      • Releases
        • Version 0.12.0
          • Test Report
        • Version v0.11.1
          • Test Report
        • Version 0.11.0
          • Test Report
        • Version 0.10.0
          • Test Report
        • Version 0.9.0
          • Test Report
        • Version 0.8.1
        • Version 0.8.0
          • Test Report
  • INJI CERTIFY
    • Overview
      • Features
    • Develop
      • Technology Stack
      • Components
      • Tested Operating Systems
    • Test
      • Functional Overview
      • Workflow
    • Setup
      • Local Setup
    • Releases
      • Version 0.11.0
        • Test Report
      • Version 0.10.2
        • Test Report
      • Version 0.10.1
        • Test Report
      • Version 0.9.1
        • Test Report
      • Version 0.9.0
        • Test Report
      • Version 0.8.1
      • Version 0.8.0
    • FAQ
      • FAQ
  • INJI VERIFY
    • Overview
      • Features
    • Develop
      • Technology Stack
      • Components
      • Supported Browsers
      • Customization
        • UI Customizations
        • Locale Customizations
      • Integration Guides
        • OpenID4VP-VP Verification Integration Guide
    • Test
      • Try It Out
        • Inji Verify - Collab Guide
      • Workflow
      • End User Guide
      • Functional Overview
    • Setup
      • Local Setup
      • Generate QR Code
    • Releases
      • Version 0.12.0
        • Test Report
      • Version 0.11.1
        • Test Report
      • Version 0.11.0
        • Test Report
      • Version 0.10.0
        • Test Report
      • Version 0.9.0
        • Test Report
      • Version 0.8.1
      • Version 0.8.0
        • Test Report
  • FAQ
Powered by GitBook

Copyright © 2021 MOSIP. This work is licensed under a Creative Commons Attribution (CC-BY-4.0) International License unless otherwise noted.

On this page
  • Repositories
  • Prerequisite
  • Android - Build and Run
  • 1a. Installation and Keystore generation on MAC
  • 1b. Installation and Keystore generation on Windows
  • 2. Command to build the application
  • 3. Troubleshooting
  • 4. Setting Up Google API Services and Client ID for Data backup & Restore
  • 5. Build for PlayConsole
  • iOS - Build and run
  • 1. Installation and Keystore generation
  • 2. Build process
  • 3. Build for TestFlight

Was this helpful?

Export as PDF
  1. Inji Wallet
  2. Inji Mobile

Setup

Last updated 5 months ago

Was this helpful?

Repositories

Prerequisite

To perform offline sharing using BLE, we recommend below:

  • Devices with Bluetooth v4.2 and above

  • Android v23 and above for Android

Android - Build and Run

The below sections describe the steps for building the android application in Mac and Windows OS.

1a. Installation and Keystore generation on MAC

Step 1:

Configure Node & npm (recommended to use v16.19.0)

brew install nvm

nvm install 16.19.0

nvm use 16.19.0

Step 2:

Configure Yarn

brew install yarn

Step 3:

Configure Gradle & Java

curl -s "https://get.sdkman.io" | bash

sdk install gradle 7.5.1

sdk install java 17.0.13-amzn

Step 4:

Step 5:

Configure environment variables in your ~/.zshrc / or ~/.bashrc (depending upon your shell)

export ANDROID_HOME="$HOME/Library/Android/sdk"

export ANDROID_PLATFORM_TOOLS="$ANDROID_HOME/platform-tools"

export ANDROID_CMDLINE_TOOLS="$HOME/Library/Android/sdk/cmdline-tools/latest/bin/"

export PATH="$PATH:$ANDROID_PLATFORM_TOOLS:$ANDROID_CMDLINE_TOOLS"

Step 6:

Generate debug keystore for building debug build.

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"

Export keystore

export DEBUG_KEYSTORE_ALIAS=androiddebugkey

export DEBUG_KEYSTORE_PASSWORD=android

1b. Installation and Keystore generation on Windows

Step 1:

  • Install Git

  • Use the below link to download git

https://git-scm.com/download/win
  • After installation, run Git as admin.

Step 2:

  • Install SDKMAN

  • Use the below command in Git terminal

curl -s "<https://get.sdkman.io>" | bash
  • If you encounter an error while installing sdkman, please install zip on your system using your favourite package manager.

Install zip

  1. SDKMan requires the installation of the zip utility, which is not included in the default installation of Windows Git Bash.

  2. Locate zip in the list of available files and download the zip-3.0-bin.zip archive. Extract the zip.exe file from the archive and place it in the bin folder. Location of bin folder C:\Program Files\Git\usr\bin.

  3. Finally, rerun the SDKMan installation script.

Step 3:

  • Install gradle

  • Use the command below in Git terminal.

sdk install gradle 7.5.1
  • To check the installed gradle version.

gradle -V

Step 4:

[!TIP]
Restart system

Step 5:

  • Install expo

npm install --global expo-cli

Step 6:

Step 7:

Step 8:

  • Install nvm

curl -o- <https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh> | bash

or

wget -qO- <https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh> | bash

update the nvm version

nvm install 16.19.0
nvm use 16.19.0

Step 9:

Install adb

https://sourceforge.net/projects/quickadb/

Configure ANDROID_HOME and JAVA_HOME in system environment variables

2. Command to build the application

Step 1:

  • Clone Inji repository.

Step 2:

  • Create an android/local.properties file with the following data:

sdk.dir = <location-of-the-android-sdk>
  • Alternatively, you can open the Android folder in the android studio. It will create local.properties file with sdk.dir = <location-of-the-android-sdk>.

Note:

  • Default path for MacOS: /Users/<username>/Library/Android/sdk

  • Default path for Linux: /home/<username>/Android/Sdk

  • Default path for Windows: C:\Users\<username>\AppData\Local\Android\sdk

Step 3:

  • Inji application currently supports two themes: gradient and purple.

  • The default theme of the app is gradient.

  • To change the theme of the application, go to .env file and change the value of APPLICATION_THEME to purple or orange to apply gradient theme

Step 4:

Step 5:

  • Go to the root folder of the project in the terminal.

  • Install all the dependencies using npm install.

Step 6:

Build and run the application on the device:

  • Run npm run android:mosip to build and install the application on the device.

  • Run npm run android:mosip --reset-cache to build and install the application if any change is made in the .env file.

3. Troubleshooting

If you encounter the below issue on Windows,

**FAILURE:** Build failed with an exception.

**Where:**
  Script 'C:\....\inji\node_modules\expo\scripts\autolinking.gradle' line: 2

**What went wrong:**
  A problem occurred evaluating script.
  > Could not read script 'C:\"PATH"\inji\node_modules\expo\scripts\android\autolinking_implementation.gradle' as it does not exist.
  • Run npm i expo-modules-autolinking@~1.1.0 and rebuild the app

  • Path for debug apk in Inji directory android/app/build/outputs/apk/mosip/debug

4. Setting Up Google API Services and Client ID for Data backup & Restore

Step 1:

Creating A Google Cloud Project Refer to this documentation on setting up a Google Cloud Project - https://developers.google.com/workspace/guides/create-project

Step 2:

Enabling Google Drive APIs Go to - https://console.cloud.google.com/apis/library

Search for Google drive API and Select Google Drive API from the list.

Then enable the API.

Step 3:

Create Google Consent Screen

Go to - https://console.cloud.google.com/apis/credentials/consent

Create a new Consent Screen with necessary details such as - App Name, User Support Email, App Logo and Developer Info. Once added these details Save and Continue.

Step 4:

Create Oauth Client ID

Go to - https://console.cloud.google.com/apis/credentials

Click on CREATE CREDENTIALS and choose OAuth client ID

Choose Appliation type as Android

Add in details such as Name, Package Name and SHA- Fingerptint

Note:

  • SHA-1 should be of the keystore generated for signing the APK

  • Make sure you have checked Custom URI Scheme in Advanced Settings

  • The APK signing keystore needs to be unchanged for backup feature to work as the SHA-1 is 1-1 mapped for a client ID created

Step 5:

Set Environment Variable

Once the Client ID has been created copy the client ID and add it as part of .env file.

GOOGLE_ANDROID_CLIENT_ID="<copied-client-id>"

5. Build for PlayConsole

The Internal testing version of the build can be uploaded to PlayConsole for testing. PlayConsole allows the creation of internal testers group.

Publishing build manually to PlayConsole

A Google play console developer account is a must to publish builds in PlayConsole.

  1. Set the backend URL and choose a theme (orange | purple) inside the .env file.

  2. Build the Apk or App bundle.

  3. Login to PlayConsole and create a new release inside Internal testers.

  4. Upload the Apk or App bundle to PlayConsole.

Upload in PlayConsole

  1. Once the build is uploaded and saved you will be able to see the status of the release with version name, code, API level and some more details.

  1. Select the testers group you want to share with. Once saved, you can copy the link and share the same with the testers to test the APK or App bundle.

  1. You are required to manually share the link with the testers as they will not receive any notifications when a new build is uploaded.

Publishing build via Github actions (Automation) to PlayConsole

  1. A Google PlayConsole developer account must be configured to Inji to publish builds via PlayConsole.

Testers must be added to internal testers group in Play console.

  1. To deploy the Android build to PlayConsole, select Android Custom Build workflow from github actions.

  1. Choose the branch, backend url, theme and describe about build details.

  2. Click the Run workflow button.

  3. Once the pipeline has done with building the app (takes around ~25-30min), you need to login to PlayConsole and verify the build version name and code in the internal testers track.

  4. Now, you can share the link to testers.

Note: Only those who are registered in the selected testers group will be able to download the App from Google Play.


iOS - Build and run

The below section describes the steps build the iOS application.

1. Installation and Keystore generation

Step 1:

Step 2:

Step 3:

Enable iCloud and create Containers, refer https://developer.apple.com/help/account/manage-identifiers/create-an-icloud-container/

2. Build process

  • Install all the dependencies

npm install
npx pod-install
  • Run Metro bundler in the background

npm start
  • Run Inji directly to a connected device Command to run on simulator

npm run ios

Command to run real device

npm run ios -- --device

3. Build for TestFlight

The beta version of the build can be uploaded to TestFlight for testing. TestFlight allows the creation of internal and external testing teams who will be notified once a new build is published.

Publishing build manually to TestFlight

An Apple developer account is a must to publish builds in TestFlight.

  1. Set the backend URL and choose a theme (orange | purple) inside the .env file.

  2. Archive the build using xcode.

  3. Upload the archive to Testflight.

First choose Distribute App.

Upload in TestFlight

  1. Login to TestFlight and check for the build upload status. Once the build is uploaded successfully, add Groups to provide access to testers.

  1. All the group members will be notified about the new build. Open TestFlight and install the new version.

Publishing build via Github actions (Automation) to TestFlight

An Apple developer account must be configured to Inji app to publish builds via TestFlight.

Testers must be added to group in TestFlight.

  1. To deploy the iOS build to testflight, select Inji iOS build workflow from github actions.

  1. Choose the branch, backend URL, theme, testers group from TestFlight to get the build and describe about build details.

  2. Click the Run workflow button.

  3. Once the pipeline has done with building the app (takes around ~25-30min), TestFlight notifies corresponding testers associated with the testers group in email about deployed build details.

for iOS development

Configure Expo, refer .

Configure Android SDK, refer .

To address this, please visit the .

Install Java JDK, refer .

Install Android SDK, refer .

Install Node, refer .

Update mimoto url as https://api.collab.mosip.net

Update esignet host as https://esignet.collab.mosip.net

To deploy mimoto in local refer

Follow the to configure Node & npm, Expo and generate debug keystore

Configure XCode, refer .

Gradle
Java 17
Expo
Android SDK
Node
XCode
here
here
website
here
here
here
here
here
here
here
Steps
GCP API Library
GCP Drive API Enable
GCP Create Client ID
GCP Create Client ID
GCP Create Client ID
Internal testers
img.png
img.png
img.png
img.png
img.png
img.png
Testflight testers
img.png
img.png
img.png
img.png
img.png
img.png
img.png
https://github.com/mosip/inji-wallet