Mobile Development Overview
This section covers the Pivot Mobile app development workflow, from local development through to production releases.
Quick Links
- iOS Build System - Schemes, configurations, and provisioning profiles
- Creating New Environments - How to add development3, development4, etc.
- Push Notifications (APNs) - Configure iOS push notifications with Firebase
- Deployment Guide - Commands and authentication for deployments
Branching Strategy
Pivot Mobile uses a multi-branch strategy that enables parallel development and isolated testing for large features.
Branch Purposes
| Branch | Purpose | TestFlight App | Automatic Build |
|---|---|---|---|
development | Main development branch | Pivot Dev | Yes |
development2 | Large features / Side projects | Pivot Dev 2 | Yes |
main | Staging / QA | Pivot QA | Yes |
production | App Store release | Pivot | Yes |
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
developmentwork
This allows QA to test in-progress commits without disrupting the main development flow.
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
| Branch | Workflow File | Fastlane Lane |
|---|---|---|
development | .github/workflows/ios-dev-build.yml | dev |
development2 | .github/workflows/ios-dev2-build.yml | dev2 |
main | .github/workflows/ios-qa-build.yml | qa |
production | .github/workflows/ios-production-build.yml | release |
Build Process Overview
Each CI/CD build performs these steps:
- Checkout code - Pulls the latest commit from the branch
- Setup Ruby - Installs Ruby for Fastlane
- Install npm dependencies -
npm ci - Install CocoaPods - iOS native dependencies
- Setup SSH for certificates - Access to
pivot-mob-certrepo - 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
| Environment | Bundle ID | Firebase Project |
|---|---|---|
| Dev | jobs.pivot.dev | pivot-dev-59310 |
| Dev 2 | jobs.pivot.dev2 | pivot-dev-59310 |
| QA | jobs.pivot.qa | pivot-not-production-project |
| Production | com.pivot3 | pivot-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:
- Sets the active Xcode scheme
- Opens the workspace
- 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
Never run match with --force unless you specifically need to regenerate profiles. This will invalidate existing profiles for all team members.
Next Steps
- iOS Build System - Deep dive into Xcode schemes and configurations
- Creating New Environments - Add development3, development4, etc.
- Deployment Guide - Manual deployment commands