Skip to content

petedavisdev/fithacker-app

Repository files navigation

FITHACKER

🚶 🏃‍♀️ 🤸 💪 🌴 🦵

A simple fitness app built with React Native and Expo.

Apple App Store

fithacker.app

Development

This project uses EAS development builds, not Expo Go.

Prerequisites

  • Node.js and npm
  • EAS CLI - Install globally: npm install -g eas-cli@latest
  • Expo Orbit (optional) - Simplifies installing and launching builds
  • For iOS: Xcode and iOS Simulator
  • For Android: Android Studio and emulator

Refer to Expo's environment setup guide for detailed platform-specific requirements.

Initial Setup

  1. Install dependencies
npm install
  1. Login to EAS
eas login

Build Variants

The app supports multiple build variants configured in app.config.js (see APP_VARIANTS array).

Set the variant using the APP_VARIANT environment variable:

APP_VARIANT=development npm run ios:dev

Development Workflow

iOS Development

  1. Build development client (first time or when native dependencies change)
npm run ios:dev
# or for simulator: npm run ios:sim
  1. Install the build

    • Using Orbit: One-click install from the EAS dashboard
    • Manually: Download and drag to simulator, or run eas build:run
  2. Start the development server

npm start
# or for iOS specifically: npm run ios

Android Development

  1. Build development client
eas build --profile development --platform android
  1. Install the build

    • Using Orbit: One-click install from the EAS dashboard
    • Manually: Download and install APK, or run eas build:run
  2. Start the development server

npm start
# or for Android specifically: npm run android

Web Development

Local development:

npm run web

Build for deployment:

npm run web:build

Available Scripts

See package.json for all available scripts. Common commands:

  • npm start - Start Expo dev server
  • npm test - Run Jest tests
  • npm run ios:dev - Build development build for iOS
  • npm run ios:update:prod - Push OTA update to production

For a complete list of build, deploy, and utility scripts, refer to the scripts section in package.json.

Version Management

Version is managed in app.config.js (expo.version field).

When releasing a new version:

  • Update the version using full semver format: Major.Minor.Patch (e.g., "2.1.0")
  • This version is used as the runtimeVersion for EAS OTA updates
  • See Expo versioning docs for details

OTA Updates

Push over-the-air updates to production without rebuilding:

npm run ios:update:prod

This only works for JavaScript/asset changes. Native changes require a new build.

Upgrading Dependencies

Upgrading Expo SDK

To upgrade to the latest Expo SDK version:

  1. Update the Expo package
npm install expo@latest
  1. Upgrade all Expo dependencies
npx expo install --fix
  1. Verify the upgrade
npx expo-doctor
  1. Rebuild development clients

Since native dependencies may have changed, you'll need to create new development builds:

npm run ios:dev
# and/or
eas build --profile development --platform android
  1. Review release notes

Check the Expo SDK release notes for breaking changes and migration steps.

Upgrading Other Dependencies

For non-Expo packages:

npm update  # Update all packages within their semver ranges
# or for specific packages to latest version
npm install package-name@latest

Always rebuild development clients after upgrading native dependencies. See npm update docs for more details.

Testing

Run the Jest test suite:

npm test

Tests are co-located with source files using the .test.ts or .test.tsx extension.

Troubleshooting

Development build won't install

  • Ensure your device/simulator meets the minimum OS requirements
  • For iOS: Check that the provisioning profile is valid
  • Try clearing EAS cache: eas build --clear-cache

Metro bundler connection issues

  • Ensure your device is on the same network as your development machine
  • Try restarting the dev server: Stop and run npm start again
  • Clear Metro cache: npm start -- --clear

OTA update not appearing

  • Verify the channel matches your build profile
  • Check that only JS/asset changes were made (not native code)
  • Updates may take a few minutes to propagate
  • Force close and reopen the app

Build variants not working

  • Ensure APP_VARIANT environment variable is set correctly
  • Verify the variant exists in app.config.js APP_VARIANTS array
  • Example: APP_VARIANT=development eas build --profile development --platform ios

About

Expo React Native app

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published