Suicide&Co - Installing & Running The Build
-
Clone the build:
git clone [email protected]:suicide-and-co/react-native-app.git sidekick -
Copy the environment variables and add api and encryption keys
cp .env.example .env -
Change to correct node version and install dependencies
nvm use npm install -
Make sure you have Android Studio and Xcode installed.
-
Plug in your IOS/Android device and make sure developer mode is enabled. Accept any permissions that may be required when you plug in your device. Set up your device to be linked up with either Android Studio or Xcode.
-
Run the app on Metro's dev server:
npx expo run:android // run on Android or npx expo run:ios // run on IOS -
Once the dev app is installed on your device you can open it. If the app doesn't open on your device; check the console to see if you're using the development build - not Expo Go (you can toggle this with your s key) and if so scan the QR code with your devices camera to open. In some circumstances, depending on your internet configuration you may find you can't open the app. If you've already run
npx expo run:androidornpx expo run:iosand the dev build was successful, you can try runningnpx expo start --clear --tunnelThis will start the dev server and should allow you to connect. Please note that the
tunnelflag compiles a lot slower then without it so only use it if necessary.
Troubleshooting
- If you are having dev building issues make sure you are using Java v17
- If you are having dev building issues for Android; in the directory
/androidcopylocal.properties.exampletolocal.propertiesand add your Android Studio SDK directory. It should be something similar to:sdk.dir=/Users/[user]/Library/Android/sdk