Complete guide for setting up the ACP Mobile development environment.
# Check version
node --version
# Should output v20.x.x or higherDownload from nodejs.org if needed.
- Xcode (latest version from App Store)
- Xcode Command Line Tools:
xcode-select --install
- CocoaPods:
sudo gem install cocoapods
- Android Studio (Download)
- Android SDK (installed via Android Studio)
- Android Emulator (created via Android Studio AVD Manager)
# Check version
git --version- Expo Go app on physical device (iOS/Android)
- VS Code with extensions:
- ESLint
- Prettier
- React Native Tools
- TypeScript and JavaScript Language Features
git clone https://github.com/ambient-code/acp-mobile.git
cd acp-mobilenpm installThis installs all Node.js dependencies defined in package.json.
Create .env file (optional for development):
cp .env.example .envEdit .env with your configuration:
# API Configuration
EXPO_PUBLIC_API_BASE_URL=https://ambient-code.apps.rosa.vteam-stage.7fpc.p3.openshiftapps.com
# OAuth Configuration
EXPO_PUBLIC_OAUTH_CLIENT_ID=your-client-id
EXPO_PUBLIC_OAUTH_REDIRECT_URI=acp://oauth/callback
# Feature Flags
EXPO_PUBLIC_USE_MOCK_DATA=true
EXPO_PUBLIC_USE_MOCK_SSE=trueNote: Mock data is enabled by default, so .env is optional for initial development.
Install iOS dependencies:
cd ios
pod install
cd ..npm startThis starts the Expo dev server. You'll see options to:
- Press
ito open iOS simulator - Press
ato open Android emulator - Scan QR code with Expo Go app
- Open Xcode → Preferences → Locations
- Ensure Command Line Tools is selected
- Open Simulator: Xcode → Open Developer Tool → Simulator
- Run app:
npm run ios
# List available simulators
xcrun simctl list devices
# Run on specific device
npx expo run:ios --device "iPhone 14"- Open Android Studio → Tools → AVD Manager
- Create Virtual Device:
- Device: Pixel 5 or similar
- System Image: Latest Android version (API 33+)
- AVD Name: Pixel_5_API_33
- Start emulator from AVD Manager
- Run app:
npm run android
If emulator doesn't start:
# Check adb connection
adb devices
# Start adb server if needed
adb start-server- Install Expo Go from App Store
- Ensure iPhone and Mac are on same WiFi network
- Run
npm start - Open Camera app and scan QR code
- Install Expo Go from Google Play
- Ensure Android device and computer are on same WiFi network
- Run
npm start - Open Expo Go and scan QR code
# Type check
npm run type-check
# Lint check
npm run lint
# Format check
npm run format:check
# Run all checks
npm run validateAll checks should pass without errors.
# iOS
npm run ios
# Android
npm run androidThe app should launch in the simulator/emulator and display the dashboard with mock sessions.
For connecting to the real ACP backend with OAuth authentication:
Contact the ACP platform team to register your development OAuth application.
You'll receive:
- Client ID
- Redirect URI:
acp://oauth/callback
Add to .env:
EXPO_PUBLIC_OAUTH_CLIENT_ID=your-actual-client-id
EXPO_PUBLIC_OAUTH_REDIRECT_URI=acp://oauth/callbackIn hooks/useSessions.ts:
const USE_MOCK_DATA = falseIn hooks/useRealtimeSession.ts:
const USE_MOCK_SSE = false- Launch app
- You'll be redirected to Red Hat SSO login
- Authenticate with your Red Hat credentials
- App should redirect back and display real sessions
git checkout -b feature/your-feature-nameEdit code in your editor. The app will hot-reload automatically.
npm run validateThis runs TypeScript type checking, ESLint, and Prettier.
Pre-commit hooks will automatically:
- Format code with Prettier
- Lint code with ESLint
- Block commit if there are errors
git add .
git commit -m "feat: add new feature"git push origin feature/your-feature-nameThen create a Pull Request on GitHub.
Create .vscode/settings.json:
{
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
},
"typescript.tsdk": "node_modules/typescript/lib",
"typescript.enablePromptUseWorkspaceTsdk": true
}code --install-extension dbaeumer.vscode-eslint
code --install-extension esbenp.prettier-vscode
code --install-extension msjsdiag.vscode-react-native- Install React Native Debugger
- Run app in development mode
- Shake device or press
Cmd+D(iOS) /Cmd+M(Android) - Select "Debug" from menu
- Run app
- Shake device or press
Cmd+D(iOS) /Cmd+M(Android) - Select "Debug Remote JS"
- Open Chrome DevTools at
http://localhost:8081/debugger-ui
import { logger } from '@/utils/logger'
// Development only logging
logger.debug('Debug message', { data })
logger.info('Info message')
logger.warn('Warning message')
logger.error('Error message', error)Logs are stripped in production builds.
The app includes a performance monitoring suite in development mode:
- Run app in dev mode
- Tap the 📊 button (top-right)
- View real-time metrics:
- Memory usage
- FPS (frames per second)
- Render count
- React Query cache stats
// In development console
performance.report() // Full performance reportSee Performance Monitoring Guide for details.
- Apple Developer Account ($99/year)
- Xcode (latest version)
- Mac with macOS 13+
- Google Play Developer Account ($25 one-time)
- Android Studio
- Keystore for app signing
For over-the-air updates and cloud builds:
npm install -g eas-cli
eas login
eas build:configureSee Expo EAS documentation for details.
See Troubleshooting Guide for solutions to common problems.
Next Steps:
- Quick Start Guide - Get running quickly
- Contributing Guide - Contribution guidelines
- API Reference - Explore the codebase