Code Signing
Set up code signing for TestFlight and App Store distribution in the signing guide.
This guide walks you through setting up a RunnerHub pipeline with Fastlane, the popular automation tool for iOS development. Fastlane simplifies complex build, test, and deployment workflows.
Create .runnerhub/runnerhub.yml in your repository root:
name: iOS Buildplatform: ios
environment: xcode: "16.4"
triggers: - push - pull_request
steps: - name: Install gems run: bundle install
- name: Install pods run: pod install
- name: Build app run: fastlane buildThis pipeline:
Gemfile.lockbuild Fastlane laneMake sure your fastlane/Fastfile includes the lane you referenced in the pipeline. For example:
default_platform(:ios)
platform :ios do desc "Build the iOS app" lane :build do build_app( workspace: "MyApp.xcworkspace", scheme: "MyApp", configuration: "Debug", sdk: "iphonesimulator", destination: "generic/platform=iOS Simulator", skip_package_ipa: true, skip_package_pkg: true ) end
desc "Run tests" lane :test do run_tests( workspace: "MyApp.xcworkspace", scheme: "MyApp", destination: "generic/platform=iOS Simulator" ) endendIf your Fastlane lanes need secrets (API keys, certificates, etc.), add them to your app in the RunnerHub dashboard:
APPLE_ID, APP_STORE_CONNECT_API_KEY, etc.$VARIABLE_NAME:steps: - name: Build app run: fastlane build env: APPLE_ID: $APPLE_ID APPLE_ID_PASSWORD: $APPLE_ID_PASSWORDHere’s a complete pipeline that builds and deploys to TestFlight:
name: TestFlight Deployplatform: ios
environment: xcode: "16.4"
triggers: - push
steps: - name: Install gems run: bundle install
- name: Install pods run: pod install
- name: Build and deploy run: fastlane beta env: APP_STORE_CONNECT_API_KEY: $APP_STORE_CONNECT_API_KEY APP_STORE_CONNECT_ISSUER_ID: $APP_STORE_CONNECT_ISSUER_ID
artifacts: - build/**/*.ipaAnd your fastlane/Fastfile:
lane :beta do build_app( workspace: "MyApp.xcworkspace", scheme: "MyApp", configuration: "Release", export_method: "app-store" )
upload_to_testflight( api_key_path: "path/to/AuthKey.p8", skip_waiting_for_build_processing: true )endUse bundle exec for consistency:
- name: Run tests run: bundle exec fastlane testPin gem versions in your Gemfile:
gem 'fastlane', '~> 2.218.0'Organize lanes logically:
lane :ci do setup_ci if is_ci build testendRunnerHub automatically caches:
Gemfile.lock)Your builds will be fast after the first run!
Test Lane:
lane :test do run_tests( workspace: "MyApp.xcworkspace", scheme: "MyApp" )endRelease Lane:
lane :release do build_app( workspace: "MyApp.xcworkspace", scheme: "MyApp", configuration: "Release", export_method: "app-store" )
upload_to_app_store( api_key_path: "path/to/AuthKey.p8" )endCode Signing
Set up code signing for TestFlight and App Store distribution in the signing guide.
iOS Native Build
Prefer direct Xcode control? See the native Xcode guide.
Environment Variables
Learn more about app variables and secrets.
Pipeline Reference
Explore all YAML options in the pipeline reference.