git clone https://github.com/SupersaasHQ/essentials-mobile.git
Make sure to install the dependencies:
pnpm install
npm install -g expo-cli
cp .env.example .env
Then update the value of EXPO_PUBLIC_API_URL
in the .env file with your Supersaas backend URL.
npx expo prebuild --clean
Generates native Android and iOS directories using Prebuild.
Note: You need to run pre-build if you add a new native dependency to your project or change the project configuration in Expo app config (app.config.ts), The --clean
flag is optional but recommended to remove the stale native project directories.
npx expo start
After that, you will see the QR code on your terminal.
If you are using an Android device, you can just press a
to run the app on your device.
If you are using an iOS device, you can just press i
to run the app on your device.
If you are using a simulator, you can just press s
to run the app on your simulator.
Or you can scan the QR code with your device to connect to the app.
If you have any issues/doubts, please check the expo setup guide.
Connect your iPhone/Android device and run the following command to install the app on your device.
## iOS
npx expo run:ios -d
## Android
npx expo run:android -d
You need to have an Apple Developer account to run the app on your iPhone. Please refer this link to setup the Apple Developer account.
Please always to install the packages using the command npx expo install package-name
instead of pnpm install package-name
.
This is crucial for native dependencies because the expo will automatically install the correct compatible version while pnpm/yarn/npm will install the latest version which may or maynot be compatible.
pnpm lint
pnpm test
Notes:
web
as well, but we don't have that setup in this project.