Skip to content

internxt/drive-mobile

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1,432 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status GitHub

Internxt Drive Mobile

Internxt

Stack

  • React Native 0.81.5 · Expo 54 · React 19 · TypeScript 5.9
  • State management: Redux Toolkit
  • Navigation: React Navigation 6
  • Styling: tailwind-rn

Requirements

  • Node version: ≥ 20
  • JDK version: 17+
  • SDK version: 34+

In case that you open the project in Android Studio:

  • NDK version: 23.1.7779620
  • CMake version: 3.22.1

Setup

Follow these steps before running the project.

1. Installation

  • Create a .npmrc file from the .npmrc.template example provided in the repo.
  • Replace TOKEN with your own Github Personal Access Token with read:packages permission ONLY
  • Use yarn to install project dependencies.

2. Environment

In order to configure the environment, you have to create /env/.env.development.json and /env/.env.production.json files.

Take a look to /env/.env.example.json file to know the required environment variables.




Development

Remember to run the tailwind command during development to dynamically add and remove styles from src/styles/tailwind.json depending on the used classes:

yarn tailwind:dev

Other useful commands:

yarn check-ts        # TypeScript type check (run before committing)
yarn lint            # type check + ESLint
yarn lint:fix        # lint with auto-fix
yarn test:unit       # run Jest unit tests
yarn test:unit:watch # run Jest in watch mode



Android

We can run the android application in any operating system, although for each one we will have to follow some different steps

Android installation

Ports mapping

In order to connect a real device or an emulator to localhost interface, we have to map used ports in our computer with the device ports.

First list the connected devices:

adb devices

Then use the following command to map DEVICE_ID device PORT to your localhost PORT:

adb -s DEVICE_ID reverse tcp:PORT tcp:PORT

ADB (Android Debug Bridge)

To install the ADB in Mac OS or Linux, execute the following command:

bash <(curl -s https://raw.githubusercontent.com/corbindavenport/nexus-tools/master/install.sh)

Dependencies

Opening the project with Android Studio will install the necessary dependencies to start the application.


Run

Configure a virtual device in Android Studio or connect by USB a real device with ADB to run the Android application with the following command using the Expo CLI:

yarn android



iOS

You can only run the iOS application on a Mac OS computer.

Run

yarn ios



Test

This is what you should know about project testing.

Take a look to this official article about testing in React Native.

Unit tests

yarn test:unit
# or a single file:
jest path/to/file.spec.ts

E2E tests (Detox)

yarn test:e2e:build:ios.debug
yarn test:e2e:test:ios.debug
yarn test:e2e:build:android.debug
yarn test:e2e:test:android.debug