- Install
node
&npm
:brew install node
- Install
watchman
:brew install watchman
- Install dependencies:
npm install
- Update
api.php
in Web-Expensify to add the following headers to avoid CORS issuesheader('Access-Control-Allow-Origin: *'); header('Access-Control-Allow-Credentials: true');
- Run
cp .env.example .env
and edit.env
to have your local config options
- To run a Development Server:
npm run web
- To build a production build:
npm run build
- Changes applied to Javascript will be applied automatically
- The web app automatically deploys via a GitHub Action in
.github/workflows/main.yml
- To install the iOS dependencies, run:
cd ios/ && pod install
- To run a on a Development Simulator:
npm run ios
- If the app is booting on a simulator for the first time, run the following two commands:
xcrun simctl keychain booted add-root-cert ~/Expensidev/config/ssl/rootCA.crt #Adds root cert and trusts it xcrun simctl keychain booted add-cert ~/Expensidev/config/ssl/expensify.com.dev.pem #Adds .dev cert and trusts it
- Changes applied to Javascript will be applied automatically, any changes to native code will require a recompile
- Running via
ngrok
is required to communicate with the API- Start ngrok (
Expensidev/script/ngrok.sh
), replaceexpensify.com.dev
value insrc/CONFIG.js
with your ngrok value
- Start ngrok (
- To run a on a Development Emulator:
npm run android
- Changes applied to Javascript will be applied automatically, any changes to native code will require a recompile
- To install the required tools to deploy, run
bundle install
from the root of this project - To deploy the iOS app run:
npm run deploy-ios
- The Android app automatically deploys via a GitHub action to: https://chat.expensify.com/app-release.apk
- To build an APK to share run (e.g. via Slack):
Build > Generate Signed Bundle / APK...
from Android Studio
- To run the Development app, run:
npm run desktop
- To build a production build, run:
npm run desktop-build
- The desktop app automatically deploys via a GitHub Action in
.github/workflows/desktop.yml
- To run the Jest Unit Tests:
npm run test
- If you are having issues with Getting Started, please reference React Native's Documentation
- If you are running into issues communicating with
expensify.com.dev
(CORS, SSL, etc.), running viangrok
is recommended, see step 3 in Getting Started
- If running on the iOS simulator
⌘D
, or⌘M
on Android emulator will open the debugging menu. - This will allow you to attach a debugger in your IDE, React Developer Tools, or your browser.
- For more information on how to attach a debugger, see React Native Debugging Documentation