Skip to content

Fastlane Build

Fastlane streamlines iOS app building and deployment. This recipe shows how to set up a complete build pipeline with gem installation, CocoaPods dependency resolution, and Fastlane execution.

name: iOS Build
platform: 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 build
  • Gem Installation: bundle install installs all Ruby gems specified in your Gemfile, including Fastlane and other build tools
  • Pod Installation: pod install resolves and downloads your CocoaPods dependencies
  • Fastlane: The fastlane build command runs your build lane defined in your fastlane/Fastfile

Your fastlane/Fastfile might look like:

default_platform(:ios)
platform :ios do
desc "Build the app"
lane :build do
build_app(
workspace: "MyApp.xcworkspace",
scheme: "MyApp",
configuration: "Release",
derived_data_path: "build/DerivedData",
destination: "generic/platform=iOS",
skip_package: true
)
end
end