Skip to main content

Mobile Development Overview

This section covers the Pivot Mobile app development workflow, from local development through to production releases.


Branching Strategy

Pivot Mobile uses a multi-branch strategy that enables parallel development and isolated testing for large features.

Branch Purposes

BranchPurposeTestFlight AppAutomatic Build
developmentMain development branchPivot DevYes
development2Large features / Side projectsPivot Dev 2Yes
mainStaging / QAPivot QAYes
productionApp Store releasePivotYes

When to Use development2

The development2 branch is designed for:

  • Large features that require multiple commits before being ready
  • Experimental work that might take weeks to complete
  • Isolated testing where QA needs to validate intermediate progress
  • Avoiding merge conflicts with ongoing development work

This allows QA to test in-progress commits without disrupting the main development flow.

tip

You can create additional branches (development3, etc.) following the same pattern if needed. See Creating New Environments.


CI/CD Pipeline

Every push to a tracked branch triggers an automatic iOS build and TestFlight upload via GitHub Actions.

Workflow Files

BranchWorkflow FileFastlane Lane
development.github/workflows/ios-dev-build.ymldev
development2.github/workflows/ios-dev2-build.ymldev2
main.github/workflows/ios-qa-build.ymlqa
production.github/workflows/ios-production-build.ymlrelease

Build Process Overview

Each CI/CD build performs these steps:

  1. Checkout code - Pulls the latest commit from the branch
  2. Setup Ruby - Installs Ruby for Fastlane
  3. Install npm dependencies - npm ci
  4. Install CocoaPods - iOS native dependencies
  5. Setup SSH for certificates - Access to pivot-mob-cert repo
  6. Run Fastlane - Build and upload to TestFlight

App Variants

Pivot Mobile has multiple app variants, each with its own:

  • Bundle ID (iOS) / Application ID (Android)
  • Firebase project configuration
  • App Store Connect entry

iOS Bundle IDs

EnvironmentBundle IDFirebase Project
Devjobs.pivot.devpivot-dev-59310
Dev 2jobs.pivot.dev2pivot-dev-59310
QAjobs.pivot.qapivot-not-production-project
Productioncom.pivot3pivot-inc

Local Development

Setting Up Your Environment

# Clone the repository
git clone git@github.com:pivotteam/Pivotmobile.git

# Install dependencies
npm install

# Install CocoaPods (iOS)
cd ios && pod install && cd ..

Running Locally

# iOS Development
npm run ios-dev

# iOS Production
npm run ios-prod

# Android Development
npm run android-dev

# Android Production
npm run android-prod

Switching Xcode Schemes

Use the helper script to switch between schemes:

# Available options: dev, dev2, qa, prod
./switch-scheme.sh dev2

This script:

  1. Sets the active Xcode scheme
  2. Opens the workspace
  3. Configures Xcode to use the selected scheme

Firebase Configuration

Each environment uses a different Firebase project configuration.

iOS Firebase Setup

Firebase configuration files are stored in ios/firebase/:

ios/firebase/
├── GoogleService-Info-development.plist # Dev & Dev2
├── GoogleService-Info-staging.plist # QA
└── GoogleService-Info-production.plist # Production

During builds, Fastlane copies the appropriate plist:

copy_files(
source: "./ios/firebase/GoogleService-Info-development.plist",
destination: "./ios/pivot3/GoogleService-Info.plist"
)

Code Signing

All code signing is managed through Fastlane Match, which stores certificates and provisioning profiles in the pivot-mob-cert repository.

Certificates Repository

pivot-mob-cert/
├── certs/ # Signing certificates
├── profiles/ # Provisioning profiles
└── README.md

Syncing Profiles

When you need to refresh profiles locally:

# AdHoc profiles (for TestFlight)
bundle exec fastlane match adhoc

# Development profiles (for device testing)
bundle exec fastlane match development
warning

Never run match with --force unless you specifically need to regenerate profiles. This will invalidate existing profiles for all team members.


Next Steps