Skip to main content

Overview

NearYou uses Expo’s build system to create production-ready apps for multiple platforms. This guide covers local development builds and production builds.

Prerequisites

Node.js

Node.js 18+ requiredCheck version: node --version

Package Manager

npm or yarn installedAlready configured in the project

Expo CLI

Included via expo@~54.0.20No global install needed

EAS CLI (Optional)

For cloud builds: npm install -g eas-cliNot required for local development

Development Scripts

NearYou includes several npm scripts for development:
package.json
{
  "scripts": {
    "start": "expo start",
    "android": "expo start --android",
    "ios": "expo start --ios",
    "web": "expo start --web",
    "lint": "expo lint"
  }
}

Local Development

Start Development Server

Start the Expo development server and choose a platform:
npm start
This opens the Expo Developer Tools where you can:
  • Press i for iOS simulator
  • Press a for Android emulator
  • Press w for web browser
  • Scan QR code with Expo Go app

Development Features

Fast Refresh

Automatically reloads when you save files. Changes appear instantly without losing app state.

Error Overlay

Red screen shows errors with stack traces. Click to jump to the source file.

Developer Menu

Shake device or press Cmd+D (iOS) / Cmd+M (Android) for debug options.

Element Inspector

Press Cmd+D > “Toggle Element Inspector” to inspect component layout.

Clear Cache

If you encounter strange issues, clear the Metro bundler cache:
npx expo start --clear
Use --clear after installing new dependencies or changing native configuration.

Platform-Specific Builds

iOS Build Setup

1

Install Xcode

Download Xcode from the Mac App Store (macOS only)Minimum version: Xcode 14+
2

Install iOS Simulator

Open Xcode > Preferences > Components > Install iOS simulator versions
3

Accept Xcode License

sudo xcodebuild -license accept
4

Install CocoaPods

sudo gem install cocoapods
5

Run Prebuild (if needed)

Generate native iOS project:
npx expo prebuild --platform ios
NearYou uses the New Architecture (newArchEnabled: true), which requires iOS 13.4 or higher.

Android Build Setup

1

Install Android Studio

2

Install Android SDK

Open Android Studio > More Actions > SDK ManagerInstall:
  • Android SDK Platform 34 (minimum)
  • Android SDK Build-Tools
  • Android Emulator
3

Set Environment Variables

Add to ~/.bashrc or ~/.zshrc:
export ANDROID_HOME=$HOME/Library/Android/sdk
export PATH=$PATH:$ANDROID_HOME/emulator
export PATH=$PATH:$ANDROID_HOME/platform-tools
4

Create Virtual Device

Android Studio > Device Manager > Create DeviceRecommended: Pixel 6 with Android 13+
5

Run Prebuild (if needed)

Generate native Android project:
npx expo prebuild --platform android
The Android configuration enables edge-to-edge UI (edgeToEdgeEnabled: true), requiring Android API 31+.

Web Build

Web builds work without additional setup:
npm run web
The web configuration uses static output:
app.json
{
  "web": {
    "output": "static",
    "favicon": "./assets/images/favicon.png"
  }
}

Production Builds

Expo Application Services (EAS) provides cloud-based builds:
1

Install EAS CLI

npm install -g eas-cli
2

Login to Expo

eas login
3

Configure EAS

eas build:configure
This creates eas.json with build profiles.
4

Build for Platform

eas build --platform ios
EAS Build handles signing, native dependencies, and produces app store-ready artifacts automatically.

Build Profiles

Typical eas.json configuration:
eas.json
{
  "build": {
    "development": {
      "developmentClient": true,
      "distribution": "internal"
    },
    "preview": {
      "distribution": "internal",
      "android": {
        "buildType": "apk"
      }
    },
    "production": {
      "autoIncrement": true
    }
  }
}
For development builds with debug features:
  • Includes dev menu
  • Enables fast refresh
  • Internal distribution only
For testing before production:
  • Internal distribution
  • APK format for Android (easier sharing)
  • Production-like build
For app store submission:
  • Auto-increments build number
  • Optimized and minified
  • Store-ready artifacts

Local Production Build

Build locally without EAS (requires native toolchains):
# Generate native projects
npx expo prebuild

# Build with Xcode
cd ios
xcodebuild -workspace nearyou.xcworkspace \
  -scheme nearyou \
  -configuration Release \
  -archivePath nearyou.xcarchive \
  archive
Local builds require proper signing credentials (certificates for iOS, keystore for Android).

Key Dependencies

NearYou uses these core dependencies (from package.json):
{
  "dependencies": {
    "expo": "~54.0.20",
    "expo-router": "~6.0.13",
    "react": "19.1.0",
    "react-native": "0.81.5",
    "react-native-reanimated": "~4.1.1",
    "react-native-gesture-handler": "~2.28.0"
  }
}

Expo SDK 54

Latest Expo features with React Native 0.81

Expo Router 6

File-based routing with type safety

React 19

Latest React with compiler support

Reanimated 4

Smooth 60fps animations

Build Optimization

Bundle Size Optimization

1

Enable Hermes

Hermes JavaScript engine is enabled by default in Expo 54 for better performance.
2

Tree Shaking

Import only what you need:
// Good
import { View } from 'react-native';

// Avoid
import * as RN from 'react-native';
3

Analyze Bundle

npx expo export --dump-sourcemap
npx react-native-bundle-visualizer

Performance Features

NearYou enables several performance optimizations:
app.json
{
  "newArchEnabled": true,
  "experiments": {
    "reactCompiler": true
  }
}
  • New Architecture: Better interop between JS and native code
  • React Compiler: Automatic memoization and optimization

Troubleshooting

Kill existing Metro process:
lsof -ti:8081 | xargs kill -9
npx expo start
Clean and rebuild:
cd ios
pod deintegrate
pod install
cd ..
npx expo start --clear
Clean Gradle cache:
cd android
./gradlew clean
cd ..
npx expo start --clear
Reinstall dependencies:
rm -rf node_modules package-lock.json
npm install
npx expo start --clear

Code Quality

Linting

Run ESLint to check code quality:
npm run lint
The project uses eslint-config-expo with flat config:
eslint.config.js
const { defineConfig } = require('eslint/config');
const expoConfig = require('eslint-config-expo/flat');

module.exports = defineConfig([
  expoConfig,
  {
    ignores: ['dist/*'],
  },
]);

Type Checking

Run TypeScript compiler:
npx tsc --noEmit
Add this as a pre-commit hook or CI check to catch errors early.

Next Steps

Configuration

Customize app.json and platform settings

Deployment

Deploy your built app to stores and web hosting

Build docs developers (and LLMs) love