Skip to content

Getting Started

This guide will help you set up the mobile app for local development.

Prerequisites

  • Node.js 22+
  • npm 10+
  • Xcode 15+ (for iOS development)
  • Android Studio (for Android development)
  • Expo CLI: npm install -g expo-cli
  • EAS CLI: npm install -g eas-cli

Installation

  1. Clone the repository and install dependencies:

    bash
    git clone <app-repo-url>
    cd app
    npm install
  2. Configure the SDK registry (if not already):

    bash
    # .npmrc should already be configured for Buildkite registry

Running the App

iOS Simulator

bash
npm run ios

Android Emulator

bash
npm run android

Expo Go

For quick testing without building:

bash
npm start

Then scan the QR code with Expo Go on your device.

Development Builds

For full native functionality (push notifications, etc.), create a development build:

bash
eas build --profile development --platform ios

Install the resulting build on your simulator or device.

Environment Setup

API Configuration

Edit constants/config.ts to point to your API:

typescript
export const API_URL = "http://localhost:8080"

Deep Linking

The app uses the logbook:// scheme. Test deep links:

bash
# iOS
xcrun simctl openurl booted "logbook://verify?token=xxx"

# Android
adb shell am start -a android.intent.action.VIEW -d "logbook://verify?token=xxx"

Troubleshooting

Metro Bundler Issues

Clear the cache:

bash
npm start -- --clear

CocoaPods Issues (iOS)

bash
cd ios
pod install --repo-update
cd ..

Gradle Issues (Android)

bash
cd android
./gradlew clean
cd ..

SDK Not Found

Ensure .npmrc is configured for the Buildkite registry and run:

bash
npm install @logbook/sdk@latest

Built with VitePress