Mobile App Setup Guide

This guide walks you through setting up the Storno mobile app for local development.

Prerequisites

Before you begin, make sure you have the following installed:

ToolVersionPurpose
Node.jsLTS (v20+)JavaScript runtime
npmBundled with Node.jsPackage manager
Expo CLILatestReact Native development platform
EAS CLILatestBuild and submit to app stores
XcodeLatestiOS builds (macOS only)
Android StudioLatestAndroid builds and emulators
WatchmanLatestFile watching (recommended on macOS)

Install Expo CLI and EAS CLI

npm install -g expo-cli eas-cli

iOS Setup (macOS)

  1. Install Xcode from the Mac App Store
  2. Open Xcode and install the iOS Simulator runtime
  3. Accept the Xcode license: sudo xcodebuild -license accept
  4. Install CocoaPods: sudo gem install cocoapods

Android Setup

  1. Install Android Studio
  2. In Android Studio, install the Android SDK (API 34+)
  3. Configure ANDROID_HOME in your shell profile:
export ANDROID_HOME=$HOME/Library/Android/sdk
export PATH=$PATH:$ANDROID_HOME/emulator
export PATH=$PATH:$ANDROID_HOME/platform-tools
  1. Create an Android Virtual Device (AVD) in Android Studio with API 28+ (minimum SDK)

Clone & Install

# Navigate to the mobile directory
cd mobile

# Install dependencies
npm install

Note: Always use npx expo install <package> when adding new dependencies instead of npm install <package>. Expo will automatically install the correct compatible version for your SDK.

Environment Configuration

The mobile app uses Expo environment variables defined in eas.json for different build profiles. For local development, the app connects to the API based on the build profile:

ProfileAPI URLDescription
developmenthttps://api.storno.test:8000Local development server
previewhttps://staging.storno.roStaging environment
productionhttps://api.storno.roProduction

You can change the server host at runtime from the app's settings screen (useful for switching between environments during development).

Sentry (Optional)

If you need error tracking in development, create a .env file:

SENTRY_AUTH_TOKEN=your_sentry_auth_token

This is optional for local development.

Running the App

Start the Development Server

npm start

This launches the Expo development server. You'll see a QR code and options to open the app.

Run on iOS Simulator

npm run ios

This will build the native iOS project and launch it in the iOS Simulator.

Run on Android Emulator

npm run android

Make sure an Android emulator is running or a device is connected via USB before running this command.

Run on Web

npm run web

Note: The web version has limited functionality compared to native platforms.

Prebuild (Native Code Generation)

When you add a new native dependency or modify app.config.ts, you need to regenerate the native directories:

# Android only
npm run prebuild:android

This runs expo prebuild --platform android --clean and regenerates the android/ directory.

For iOS, the native code is generated during npm run ios.

Building for Distribution

EAS Cloud Builds

# iOS
npm run build:ios:preview        # Internal testing
npm run build:ios:production     # App Store

# Android
npm run build:android:preview    # Internal testing
npm run build:android:production # Google Play

Local Android Build

npm run prebuild:android
npm run build:android:local

This produces an .aab file in android/app/build/outputs/bundle/release/.

Submit to Stores

# iOS — requires App Store Connect credentials
npm run submit:ios

# Android — requires Google Play service account key
npm run submit:android

# Build + submit in one step
npm run build:submit:ios
npm run build:submit:android

Google Play Metadata

Manage Google Play Store metadata and screenshots via Fastlane:

npm run gplay:metadata     # Upload title, descriptions
npm run gplay:screenshots  # Upload screenshots
npm run gplay:all          # Upload everything

Metadata files are in fastlane/metadata/android/ organized by locale (en-US/, ro/).

Linting

npm run lint

Uses ESLint with the official Expo flat config. Fix any lint errors before submitting a PR.

Next Steps