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.
Complete YAML
Section titled “Complete YAML”name: iOS Buildplatform: iosenvironment: 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 buildKey Points
Section titled “Key Points”- Gem Installation:
bundle installinstalls all Ruby gems specified in yourGemfile, including Fastlane and other build tools - Pod Installation:
pod installresolves and downloads your CocoaPods dependencies - Fastlane: The
fastlane buildcommand runs your build lane defined in yourfastlane/Fastfile
Typical Fastfile Structure
Section titled “Typical Fastfile Structure”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 ) endend