drive-mobile
drive-mobile copied to clipboard
Internxt Drive Mobile
Internxt
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 withread:packages
permission ONLY - Use
yarn
to install project dependencies.
2. Firebase (Optional)
Copy /GoogleService-Info.plist and /google-services.json from your Firebase application.
This is required to eject the app from expo properly using the expo eject command of expo-cli.
3. 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
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.
If you are using Mac OS an receiving the following error when during gradle sync
❌ Caused by: groovy.lang.MissingPropertyException: No such property: logger for class: org.gradle.initialization.DefaultProjectDescriptor
Try opening Android Studio with the command below to ensure Android Studio is able to find Nodeopen -a /Applications/Android\ Studio.app
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.
iOS installation
cd ios
pod install
If your computer is using M1 Apple chipset, replace the pod install
command with the following:
sudo arch -x86_64 gem install ffi
arch -x86_64 pod install
Run
yarn ios
Known issues
Current react-native-reanimated fails with Android using RN 0.64, until we upgrade RN version, a patch needs to be added manually: https://github.com/software-mansion/react-native-reanimated/issues/3161#issuecomment-1112285417
Test
This is what you should know about project testing.
Take a look to this official article about testing in React Native.