A comprehensive React Native mobile application built with Expo, featuring Auth0 authentication, multi-platform navigation, and modern development patterns. Includes a Swift reference implementation for iOS developers.
- Platform: iOS & Android (React Native 0.81 + Expo SDK 54)
- Authentication: Auth0 integration with secure token storage
- Navigation: React Navigation v7 with tab and stack navigation
- State Management: React Context + TypeScript
iOS 17 & iOS 18: Fully supported
Android 14 & Android 15: Fully supported
- Auth0 Authentication: OAuth2/OIDC with OTP verification
- Multi-Account Support: Account switching and profile management
- Cross-Platform UI: Tab navigation with 5 main sections (Spotlight, Search, Chat, Service Desk, Analytics)
- Secure Storage: Keychain/Keystore integration with fallbacks
- Real-time Data: API integration with search, filtering, and state sync
- Node.js: LTS version (20.19.4 or later)
- Expo CLI:
npm install -g @expo/cli - Development Tools:
- iOS: Xcode and iOS Simulator
- Android: Android Studio and Android Emulator
- Android Emulator:
- Start the emulator so it is available for expo
-
Clone and Navigate
git clone <repository-url> cd mpt-mobile-platform
-
Configure Environment
- Copy
.env.exampleto.env - Download
.envfile for this project from Keeper Vault - Add all necessary variables from downloaded file to your local
.envfile - Add your Auth0 configuration (see Auth0 Setup)
- Copy
-
Start Development
npx expo run:ios npx expo run:android
If Android option doesn't work:
# Navigate to Android SDK emulator directory
cd ~/Library/Android/sdk/emulator
# for Windows
cd %LOCALAPPDATA%\Android\Sdk\emulator
# List available emulators
./emulator -list-avds
# Start specific emulator (replace with your emulator name)
./emulator -avd Pixel_5_API_34# Create .npmrc in project directory
cat > .npmrc << EOF
registry=https://registry.npmjs.org/
@swo:registry=https://softwareone-pc.pkgs.visualstudio.com/_packaging/PyraCloud/npm/registry/
always-auth=true
EOF
# Install and run authentication tool
npm install -g vsts-npm-auth
vsts-npm-auth -config .npmrc
# Install packages
npm installAUTH0_DOMAIN=your-domain.auth0.com
AUTH0_CLIENT_ID=your-client-id
AUTH0_AUDIENCE=your-api-audience
AUTH0_SCOPE=openid profile email offline_access
AUTH0_API_URL=your-api-url
AUTH0_OTP_DIGITS=6
AUTH0_SCHEME=your-app-schemePlease ask team members to share specifics
Bundle Configuration:
- iOS Bundle ID:
com.softwareone.marketplaceMobile - Android Package:
com.softwareone.marketplaceMobile
Callback URLs:
# Production
softwareone.playground-platform-navigation://login-dev.pyracloud.com/ios/com.softwareone.marketplaceMobile/callback
softwareone.playground-platform-navigation://login-dev.pyracloud.com/android/com.softwareone.marketplaceMobile/callback
Note: Leave
TEMPORARY_AUTH0_TOKENempty unless debugging.
If you're working in a corporate environment with Zscaler, please make sure that your Zscaller policies are up to date.
We provide automated scripts for building and deploying to the iOS Simulator. These scripts handle the complete build cycle: cleaning, building, and deploying.
# Deploy with verbose output
./scripts/deploy-ios.sh --verbose
# Deploy with specific simulator
./scripts/deploy-ios.sh --simulator "iPhone 15 Pro"
# Deploy with logs
./scripts/deploy-ios.sh --logs
# Deploy in release mode
./scripts/deploy-ios.sh --releaseScript Options:
-c, --client-id ID: Auth0 client ID (if not configured in .env)-r, --release: Build in release mode (default: debug)-s, --simulator NAME: Specify simulator (default: iPhone 16 Pro)-f, --force-boot: Force boot simulator-l, --logs: Show app logs after launch-v, --verbose: Show detailed output-h, --help: Show help message
For rapid development with hot reload:
# Start development server with hot reload
./scripts/hot-reload.sh
# Clear cache and start
./scripts/hot-reload.sh --clear
# Auto-open iOS Simulator
./scripts/hot-reload.sh --ios
# Auto-open Android Emulator
./scripts/hot-reload.sh --androidOnce the server starts:
- Press
ifor iOS Simulator - Press
afor Android Emulator - Press
rto reload - Press
Ctrl+Cto stop
# Standard cleanup
./scripts/cleanup.sh
# Deep clean (removes node_modules, reinstalls)
./scripts/cleanup.sh --deepIf you prefer to use Expo commands directly:
# iOS
npx expo run:ios
# Android
npx expo run:androidFor detailed setup and configuration, please refer to Local Build - iOS
This project uses GitHub Actions for continuous integration and deployment.
- Triggers: Pull requests to
mainbranch - What it does:
- Installs dependencies (with caching)
- Runs ESLint (
npm run lint:check) - Runs Jest tests (
npm test)
- Runner: Ubuntu (cost-effective)
- Duration: ~2-5 minutes
- Purpose: Fast validation without expensive iOS builds
- Triggers: Push to
mainbranch - What it does:
- Runs validation (lint + tests) on Ubuntu runners
- Automatically builds iOS app after validation succeeds
- Creates iOS .app artifact (7-day retention)
- Runners: Ubuntu (validation) + macOS-14 (iOS build)
- Duration: ~25-35 minutes total
- Purpose: Ensures main branch always passes tests AND has working iOS build
- Triggers:
- Automatic: Runs on every push to
mainbranch (after validation) - Manual: Can be triggered manually via GitHub Actions UI
- Automatic: Runs on every push to
- What it does:
- Runs tests
- Generates native iOS project with Expo prebuild
- Builds iOS app (Debug or Release, unsigned)
- Uploads .app artifact (7-day retention)
- Does NOT deploy to TestFlight
- Does NOT increment version numbers
- Runner: macOS-14 (~$0.08/min)
- Duration: ~20-30 minutes
- Purpose: Build verification, ensures main branch always has working iOS build
- Triggers: Manual dispatch only (via GitHub Actions UI)
- What it does:
- Runs tests
- Auto-increments version/build number
- Generates native iOS project with Expo prebuild
- Builds and signs iOS app for App Store
- Uploads to TestFlight
- Commits version bump and creates git tag
- Uploads IPA and dSYMs as artifacts (30-day retention)
- Runner: macOS-14 (~$0.08/min)
- Duration: ~30-45 minutes
- Purpose: Complete deployment to TestFlight for internal/external testing
- Requires: TestFlight environment secrets configured
iOS Build (Automatic on Main):
- Runs automatically on every push to
mainbranch - Verifies iOS build succeeds after merging PRs
- Creates .app artifact from main branch
- Can also be triggered manually for testing
iOS Build (Manual Trigger):
- Testing build configuration changes
- Verifying builds before creating PR
- Testing on feature branches
iOS TestFlight (Always Manual):
- Deploying to internal/external testers
- Creating release candidates
- Publishing builds for testing
- Only trigger when ready to distribute
All workflows use dependency caching to speed up builds:
- npm dependencies: Cached based on
package-lock.json - CocoaPods: Cached based on
Podfile.lock(iOS builds only)
The project includes a complete TestFlight deployment workflow (.github/workflows/ios-testflight.yml).
To deploy to TestFlight:
- Navigate to Actions tab in GitHub
- Select iOS TestFlight Deployment workflow
- Click Run workflow
- Configure options:
- Version bump type: Choose build (increment build number) or patch/minor/major (increment version)
- Environment: Choose test or production (affects Auth0 configuration)
- Click Run workflow
- Wait ~30-45 minutes for complete deployment
- Check App Store Connect for the new build in TestFlight
What the workflow does:
- Runs all tests to ensure code quality
- Increments version/build number in
app.json - Generates native iOS project with Expo prebuild
- Configures code signing with distribution certificate
- Archives iOS app in Release mode
- Exports signed IPA for App Store distribution
- Uploads to TestFlight via App Store Connect API
- Commits incremented build number back to the repository
- Creates a git tag for the release (e.g.,
v4.0.0-build123) - Uploads IPA and dSYMs as artifacts (30-day retention)
Build artifacts available:
- Signed IPA file for App Store distribution
- dSYM files for crash symbolication
- Available for 30 days after deployment
All secrets must be configured in the TestFlight GitHub environment:
To configure secrets:
- Go to Settings → Environments → TestFlight
- Add environment secrets
Required secrets list:
- App Store Connect API:
APP_STORE_CONNECT_API_KEY_ID,APP_STORE_CONNECT_ISSUER_ID,APP_STORE_CONNECT_API_KEY_CONTENT - Code Signing:
IOS_DISTRIBUTION_CERTIFICATE_P12_BASE64,IOS_DISTRIBUTION_CERTIFICATE_PASSWORD,IOS_PROVISIONING_PROFILE_BASE64,PROVISIONING_PROFILE_SPECIFIER - Auth0 (Test):
AUTH0_DOMAIN_TEST,AUTH0_CLIENT_ID_TEST,AUTH0_AUDIENCE_TEST,AUTH0_API_URL_TEST - Auth0 (Production):
AUTH0_DOMAIN_PROD,AUTH0_CLIENT_ID_PROD,AUTH0_AUDIENCE_PROD,AUTH0_API_URL_PROD
Important Note on Secrets:
- GitHub secrets are read-only and cannot be copied between repositories
- All secrets must be manually recreated in the TestFlight environment
- Contact team member who has the original secret values locally
- Reference PoC repository for secret names: https://github.com/softwareone-platform/mpt-mobile-reactnative-poc/settings/secrets/actions
For detailed documentation on secrets and deployment process, see: