ESC
Type to search guides, tutorials, and reference documentation.
Verified by Garnet Grid

Mobile CI/CD Pipelines

Build automated CI/CD pipelines for iOS and Android applications. Covers build automation, code signing, test orchestration, app store deployment, and beta distribution.

Mobile CI/CD is fundamentally different from web CI/CD. Build times are longer (10-30 minutes), testing requires device farms or simulators, code signing is complex (especially iOS), and deployment goes through app store review processes that add days of latency. A well-designed mobile pipeline accounts for all of these constraints.


Mobile Pipeline Architecture

Commit:
    → Lint + Static Analysis (2 min)
    → Unit Tests (3-5 min)
    → Build Debug APK/IPA (5-10 min)

Pull Request:
    → All above +
    → UI Tests on Simulator/Emulator (10-15 min)
    → Screenshot Tests (5 min)
    → Size Analysis (1 min)

Merge to Main:
    → All above +
    → Build Release APK/IPA (10-15 min)
    → Code Signing (1 min)
    → Device Farm Tests (15-30 min)
    → Beta Distribution (TestFlight/Firebase)

Release:
    → All above +
    → Build Production (15 min)
    → App Store Submission
    → Phased Rollout (1% → 10% → 50% → 100%)

CI Platform Comparison for Mobile

PlatformiOS SupportAndroid SupportDevice FarmBest For
Bitrise✅ Native✅ NativeIntegratedMobile-first teams
GitHub Actions (macOS)✅ (macOS runners)Via Firebase Test LabGitHub-native teams
CircleCI✅ (macOS)Via integrationsFast builds, orbs
Fastlane✅ (tool, not CI)✅ (tool)N/AAutomation glue
Azure DevOps✅ (macOS agents)App CenterEnterprise, .NET MAUI
Codemagic✅ Native✅ NativeIntegratedFlutter teams

Code Signing

iOS Code Signing

ComponentPurposeManaged By
Development certificateSign debug buildsApple Developer account
Distribution certificateSign release buildsApple Developer account
Provisioning profileLinks cert + devices + app IDApple Developer portal
KeychainStores certificates on CICI machine setup
ApproachHowBest For
Fastlane MatchGit-stored, encrypted certificatesTeams, automated CI
ManualExport from Xcode, install on CISmall teams
Xcode CloudApple-managedApple-centric teams
App Store Connect APIAutomated provisioningCI/CD automation

Android Code Signing

ComponentPurpose
Debug keystoreAuto-generated for debug builds
Release keystoreSigns production APKs/AABs
Upload keySigns for Google Play upload (Play App Signing)
Google Play App SigningGoogle re-signs with distribution key

Testing Strategy

LevelWhatToolTime
UnitBusiness logic, view modelsXCTest, JUnit3-5 min
IntegrationAPI layer, databaseXCTest, Robolectric5-10 min
UI (simulator)Critical user flowsXCUITest, Espresso10-15 min
Device farmReal device compatibilityFirebase Test Lab, BrowserStack15-30 min
ScreenshotVisual regressionPaparazzi, snapshot testing5 min
PerformanceApp startup, frame rateInstruments, Benchmark10 min

App Store Deployment

StoreReview TimePhased RolloutRollback
Apple App Store1-3 days1-7 day phasesStop release (before 100%)
Google PlayHours to 1 day1% → custom %Halt rollout, new release
TestFlight (beta)< 1 day (external)N/ANew build
Firebase App DistributionInstantN/ANew build

Build Optimization

TechniqueSavingsHow
Dependency caching40-60% of build timeCache CocoaPods, Gradle, node_modules
Incremental builds50-70% on rebuildsGradle build cache, Xcode derived data
ModularizationTest only changed moduleFeature modules with independent tests
Parallel test execution50-70% test timeShard tests across simulators/emulators
Remote build cache30-50% across teamGradle remote cache, Xcode cloud cache

Anti-Patterns

Anti-PatternProblemFix
No code signing automationManual signing breaks CIFastlane Match or equivalent
Testing only on simulatorsMisses real device issuesDevice farm testing for release builds
No phased rolloutBad releases affect 100% of usersGradual rollout (1% → 10% → 50% → 100%)
Monolithic app (no modules)Full rebuild + full test on every changeFeature modules with scoped testing
Manual app store submissionError-prone, inconsistent metadataFastlane deliver/supply automation
No build caching30-minute builds on every commitDependency + build result caching

Checklist

  • CI platform selected with native mobile support (macOS for iOS)
  • Code signing automated (Fastlane Match or equivalent)
  • Pipeline stages: lint → build → test → sign → distribute
  • Unit + UI tests running on every PR
  • Device farm testing before release
  • Build caching enabled (dependencies, build results)
  • Beta distribution automated (TestFlight, Firebase App Distribution)
  • Phased rollout configured for production releases
  • App size monitoring with alerts on regression
  • Crash monitoring integrated (Firebase Crashlytics)

:::note[Source] This guide is derived from operational intelligence at Garnet Grid Consulting. For mobile engineering consulting, visit garnetgrid.com. :::

Jakub Dimitri Rezayev
Jakub Dimitri Rezayev
Founder & Chief Architect • Garnet Grid Consulting

Jakub holds an M.S. in Customer Intelligence & Analytics and a B.S. in Finance & Computer Science from Pace University. With deep expertise spanning D365 F&O, Azure, Power BI, and AI/ML systems, he architects enterprise solutions that bridge legacy systems and modern technology — and has led multi-million dollar ERP implementations for Fortune 500 supply chains.

View Full Profile →