### Usage Examples Source: https://docs.fastlane.tools/actions/verify_xcode Examples demonstrating how to use the verify_xcode action in your fastlane setup or as a one-off command. ```APIDOC ## Examples ### Basic Usage in Fastfile ```ruby verify_xcode ``` ### Specifying Xcode Path in Fastfile ```ruby verify_xcode(xcode_path: "/Applications/Xcode.app") ``` ### Running as a One-Off CLI Command ```bash fastlane run verify_xcode ``` ### Running with Parameters via CLI ```bash fastlane run verify_xcode xcode_path:"/Applications/Xcode.app" ``` ``` -------------------------------- ### Example Usage of setup_jenkins Source: https://docs.fastlane.tools/actions/setup_jenkins This is a basic example of how to use the setup_jenkins action in your Fastfile. It configures the build environment for Jenkins integration. ```ruby setup_jenkins ``` -------------------------------- ### CLI Usage Example Source: https://docs.fastlane.tools/actions/ifttt Example of how to use the ifttt action from the command line. ```APIDOC ## CLI Usage To run the ifttt action from the command line: ```bash fastlane run ifttt api_key:"your_api_key" event_name:"deployment_status" value1:"App deployed successfully" ``` ``` -------------------------------- ### Full Package.swift Example Source: https://docs.fastlane.tools/getting-started/ios/fastlane-swift A complete example of a Package.swift file configured for fastlane. ```swift // swift-tools-version:5.2 import PackageDescription let package = Package( name: "fastlaneRunner", products: [ .executable(name: "fastlaneRunner", targets: ["fastlaneRunner"]) ], dependencies: [ .package(name: "Fastlane", url: "https://github.com/fastlane/fastlane", from: "2.179.0") ], targets: [ .target( name: "fastlaneRunner", dependencies: ["Fastlane"], path: "Sources/Thingy" ) ] ) ``` -------------------------------- ### Swift Setup for Snapshotting Source: https://docs.fastlane.tools/actions/capture_screenshots Initialize the XCUIApplication and call `setupSnapshot` before launching the app in your `setUp()` method for Swift UI tests. ```swift let app = XCUIApplication() setupSnapshot(app) app.launch() ``` -------------------------------- ### Fastfile Usage Source: https://docs.fastlane.tools/actions/install_provisioning_profile Example of how to use the install_provisioning_profile action within a Fastfile. ```APIDOC ```ruby install_provisioning_profile(path: "path/to/your/profile.mobileprovision") ``` ``` -------------------------------- ### Objective-C Setup for Snapshotting Source: https://docs.fastlane.tools/actions/capture_screenshots In Objective-C, initialize XCUIApplication and use `[Snapshot setupSnapshot:app waitForAnimations:NO]` before launching the app within your `setUp()` method. ```objectivec XCUIApplication *app = [[XCUIApplication alloc] init]; [Snapshot setupSnapshot:app waitForAnimations:NO]; [app launch]; ``` -------------------------------- ### Run Snapshot Example Project Source: https://docs.fastlane.tools/getting-started/ios/screenshots Commands to clone the fastlane repository and execute the snapshot example project. ```bash git clone https://github.com/fastlane/fastlane # Clone the fastlane repo cd fastlane/snapshot/example # Navigate to the example project fastlane snapshot # Generate screenshots for the sample app ``` -------------------------------- ### Gymfile Configuration Example Source: https://docs.fastlane.tools/actions/build_ios_app Store default build settings in a Gymfile to avoid specifying them repeatedly. This example sets the scheme, SDK, clean build option, output directory, and output name. ```ruby scheme("Example") sdk("iphoneos9.0") clean(true) output_directory("./build") # store the ipa in this folder output_name("MyApp") # the name of the ipa file ``` -------------------------------- ### Usage Examples Source: https://docs.fastlane.tools/actions/get_version_number Examples demonstrating how to use the get_version_number action in your Fastfile. ```APIDOC ## Examples ### Basic Usage ```ruby version = get_version_number(xcodeproj: "Project.xcodeproj") ``` ### With Target ```ruby version = get_version_number( xcodeproj: "Project.xcodeproj", target: "App" ) ``` ``` -------------------------------- ### sh Action - Examples Source: https://docs.fastlane.tools/actions/sh Examples demonstrating how to use the 'sh' action with different arguments. ```APIDOC ## Examples ### Basic Usage ```ruby sh("ls") ``` ### With Multiple Arguments ```ruby sh("git", "commit", "-m", "My message") ``` ``` -------------------------------- ### Fastlane Action Output Example Source: https://docs.fastlane.tools/advanced/actions Example of how named steps appear in the console output. ```text [08:13:37]: --- Step: install_dependencies --- [08:13:37]: ---------------------------------- [08:13:37]: $ yarn [08:13:37]: ▸ yarn install v1.12.3 [08:13:37]: ▸ [1/4] Resolving packages... [08:13:37]: ▸ success Already up-to-date. [08:13:37]: ▸ Done in 0.04s. [08:13:37]: ------------------------------ [08:13:37]: --- Step: building_project --- [08:13:37]: ------------------------------ [08:13:37]: $ yarn build [08:13:37]: ▸ yarn run v1.12.3 [08:13:38]: ▸ $ sleep 22 && echo build the project [08:14:00]: ▸ build the project [08:14:00]: ▸ Done in 22.09s. [08:14:00]: ----------------------------- [08:14:00]: --- Step: testing_project --- [08:14:00]: ----------------------------- [08:14:00]: $ yarn test [08:14:00]: ▸ yarn run v1.12.3 [08:14:00]: ▸ $ sleep 30 && echo test all the things [08:14:30]: ▸ test all the things [08:14:30]: ▸ Done in 30.09s. [08:14:30]: ------------------ [08:14:30]: --- Step: yarn --- [08:14:30]: ------------------ [08:14:30]: $ yarn publish-coverage [08:14:30]: ▸ yarn run v1.12.3 [08:14:31]: ▸ $ sleep 12 && echo Covered all the things [08:14:43]: ▸ Covered all the things [08:14:43]: ▸ Done in 12.10s. +------+----------------------------+-------------+ | fastlane summary | +------+----------------------------+-------------+ | Step | Action | Time (in s) | +------+----------------------------+-------------+ | 1 | install_dependencies | 0 | | 2 | building_project | 22 | | 3 | testing_project | 30 | | 4 | yarn | 12 | +------+----------------------------+-------------+ ``` -------------------------------- ### Install Provisioning Profile in Fastfile Source: https://docs.fastlane.tools/actions/install_provisioning_profile Use this syntax within your Fastfile to install a provisioning profile from a specific path. ```ruby install_provisioning_profile(path: "profiles/profile.mobileprovision") ``` -------------------------------- ### View action documentation via CLI Source: https://docs.fastlane.tools/actions/setup_ci Command to display the documentation for setup_ci in the terminal. ```bash fastlane action setup_ci ``` -------------------------------- ### Example Usage Source: https://docs.fastlane.tools/actions/add_extra_platforms Demonstrates how to use the add_extra_platforms action with specific platforms. ```APIDOC ## Example Usage To add Windows and Neo Geo as supported platforms: ```ruby add_extra_platforms(platforms: [:windows, :neogeo]) ``` ``` -------------------------------- ### View setup_circle_ci documentation via CLI Source: https://docs.fastlane.tools/actions/setup_circle_ci Display the action's documentation directly in the terminal. ```bash fastlane action setup_circle_ci ``` -------------------------------- ### Run xctool test action Source: https://docs.fastlane.tools/actions/xctool A basic example of how to invoke the xctool test action. Ensure xctool is installed. ```ruby xctool(:test) ``` -------------------------------- ### Initialize fastlane in Project Source: https://docs.fastlane.tools/ Run the fastlane initialization command in your iOS or Android project directory. This command detects your project setup and guides you through initial configuration. ```bash fastlane init ``` -------------------------------- ### Action Examples Source: https://docs.fastlane.tools/actions/get_push_certificate Common ways to call the action within a Fastfile. ```ruby get_push_certificate ``` ```ruby pem # alias for "get_push_certificate" ``` ```ruby get_push_certificate( force: true, # create a new profile, even if the old one is still valid app_identifier: "net.sunapps.9", # optional app identifier, save_private_key: true, new_profile: proc do |profile_path| # this block gets called when a new profile was generated puts profile_path # the absolute path to the new PEM file # insert the code to upload the PEM file to the server end ) ``` -------------------------------- ### Get Build Number with Mercurial Revision Number Source: https://docs.fastlane.tools/actions/get_build_number_repository This example shows how to use the `use_hg_revision_number` option to retrieve the Mercurial revision number instead of the short hash. This option is ignored for non-hg repositories. ```ruby get_build_number_repository(use_hg_revision_number: true) ``` -------------------------------- ### Show setup_travis Action Documentation Source: https://docs.fastlane.tools/actions/setup_travis Run this command in your terminal to display the documentation for the setup_travis action directly. ```bash fastlane action setup_travis ``` -------------------------------- ### Snapfile Configuration Source: https://docs.fastlane.tools/actions/capture_screenshots Example Snapfile configuration for setting up devices, languages, launch arguments, and output directory. ```ruby scheme("UITests") devices([ "iPad (7th generation)", "iPad Air (3rd generation)", "iPad Pro (11-inch)", "iPad Pro (12.9-inch) (3rd generation)", "iPad Pro (9.7-inch)", "iPhone 11", "iPhone 11 Pro", "iPhone 11 Pro Max", "iPhone 8", "iPhone 8 Plus" ]) languages([ "en-US", "de-DE", "es-ES", ["pt", "pt_BR"] # Portuguese with Brazilian locale ]) launch_arguments(["-username Felix"]) # The directory in which the screenshots should be stored output_directory('./screenshots') clear_previous_screenshots(true) override_status_bar(true) add_photos(["MyTestApp/Assets/demo.jpg"]) ``` -------------------------------- ### Select Xcode by Version Range Source: https://docs.fastlane.tools/actions/xcversion Use this to select the latest installed Xcode version within a specified range. For example, '~> 8.1.0' selects the latest version that is greater than or equal to 8.1.0 and less than 9.0.0. ```ruby xcversion(version: ">~> 8.1.0") ``` -------------------------------- ### CLI Usage Source: https://docs.fastlane.tools/actions/install_provisioning_profile How to run the install_provisioning_profile action directly from the command line. ```APIDOC ```bash fastlane run install_provisioning_profile parameter1:"value1" parameter2:"value2" ``` **Note:** The CLI supports primitive types (integers, floats, booleans, strings). Arrays can be passed as comma-delimited strings (e.g., `param:"1,2,3"`). Hashes are not currently supported. ``` -------------------------------- ### Example Semaphore CI Pipeline Configuration Source: https://docs.fastlane.tools/best-practices/continuous-integration/semaphore This YAML configuration defines a Semaphore CI pipeline for an iOS project. It includes agent setup, environment variables, dependency caching, and sequential blocks for testing, building, and taking screenshots using fastlane. ```yaml version: v1.0 name: Tallest Towers agent: machine: type: a1-standard-4 os_image: macos-mojave-xcode11 blocks: - name: Run tests task: env_vars: - name: LANG value: en_US.UTF-8 prologue: commands: - checkout - cache restore - bundle install --path vendor/bundle - cache store jobs: - name: Test commands: - bundle exec xcversion select 11.2.1 - bundle exec fastlane test - name: Build app task: env_vars: - name: LANG value: en_US.UTF-8 prologue: commands: - checkout - cache restore - bundle install --path vendor/bundle - cache store jobs: - name: Build commands: - bundle exec xcversion select 11.2.1 - bundle exec fastlane build - name: Take screenshots task: env_vars: - name: LANG value: en_US.UTF-8 prologue: commands: - checkout - cache restore - bundle install --path vendor/bundle - cache store jobs: - name: Screenshots commands: - bundle exec xcversion select 11.2.1 - bundle exec fastlane screenshots - artifact push project screenshots ``` -------------------------------- ### Get Push Certificate with Options Source: https://docs.fastlane.tools/actions/pem This example shows the get_push_certificate action with advanced options. It forces new profile creation, specifies an app identifier, ensures the private key is saved, and includes a callback block to handle the newly generated profile path. ```ruby get_push_certificate( force: true, # create a new profile, even if the old one is still valid app_identifier: "net.sunapps.9", # optional app identifier, save_private_key: true, new_profile: proc do |profile_path| puts profile_path # the absolute path to the new PEM file # insert the code to upload the PEM file to the server end ) ``` -------------------------------- ### Add Git Tag Examples Source: https://docs.fastlane.tools/actions/add_git_tag Examples showing how to use the add_git_tag action with default values, custom parameters, or a specific custom tag string. ```ruby add_git_tag # simple tag with default values ``` ```ruby add_git_tag( grouping: "fastlane-builds", includes_lane: true, prefix: "v", postfix: "-RC1", build_number: 123 ) ``` ```ruby # Alternatively, you can specify your own tag. Note that if you do specify a tag, all other arguments are ignored. add_git_tag( tag: "my_custom_tag" ) ``` -------------------------------- ### Run `pod install` with Custom Podfile and Clean Install Source: https://docs.fastlane.tools/actions/cocoapods Execute `pod install` with a specific Podfile and enable a clean install to ignore the project cache. This is useful for ensuring a fresh installation. ```ruby cocoapods( clean_install: true, podfile: "./CustomPodfile" ) ``` -------------------------------- ### Fetch Provisioning Profile with Options Source: https://docs.fastlane.tools/actions/get_provisioning_profile This example demonstrates fetching a provisioning profile with specific options: `adhoc` set to true for ad hoc distribution, `force` to overwrite existing profiles, and `filename` to specify the output file name. ```ruby get_provisioning_profile( adhoc: true, force: true, filename: "myFile.mobileprovision" ) ``` -------------------------------- ### Install Dependencies with Bundle Install Source: https://docs.fastlane.tools/getting-started/ios/setup On your CI environment, install all project dependencies, including fastlane, using `bundle install`. This should be the first build step. ```bash [sudo] bundle install ``` -------------------------------- ### Display Action Documentation Source: https://docs.fastlane.tools/actions/bundle_install Run this command in your terminal to view the documentation for the bundle_install action. ```bash fastlane action bundle_install ``` -------------------------------- ### install_provisioning_profile Source: https://docs.fastlane.tools/actions/install_provisioning_profile Installs a provisioning profile from a given path for the current user. ```APIDOC ## POST /install_provisioning_profile ### Description Installs a provisioning profile from a specified path for the current user. ### Method POST ### Endpoint /install_provisioning_profile ### Parameters #### Query Parameters - **path** (String) - Required - Path to the provisioning profile file. ### Request Example { "path": "profiles/profile.mobileprovision" } ### Response #### Success Response (200) - **installed_profile_path** (String) - The absolute path to the installed provisioning profile. #### Response Example { "installed_profile_path": "/Users/user/Library/MobileDevice/Provisioning Profiles/profile.mobileprovision" } ``` -------------------------------- ### Install Specific Xcode Version Source: https://docs.fastlane.tools/actions/xcodes Installs a specific version of Xcode. Ensure the xcodes CLI is installed. ```ruby xcodes(version: "14.1") ``` -------------------------------- ### List All Options Source: https://docs.fastlane.tools/actions/capture_screenshots Run this command to view all available options for the snapshot action. ```bash fastlane action snapshot ``` -------------------------------- ### Install ImageMagick with Homebrew Source: https://docs.fastlane.tools/getting-started/ios/screenshots Install ImageMagick, a dependency for frameit, using Homebrew. This command installs libpng, jpeg, and imagemagick. ```bash brew install libpng jpeg imagemagick ``` -------------------------------- ### Running setup_circle_ci from CLI Source: https://docs.fastlane.tools/actions/setup_circle_ci Demonstrates how to run the setup_circle_ci action directly from the command line, including passing parameters. ```APIDOC ## CLI Usage To run the `setup_circle_ci` action as a one-off command: ```bash fastlane run setup_circle_ci ``` To pass parameters, use the colon syntax: ```bash fastlane run setup_circle_ci parameter1:"value1" parameter2:"value2" ``` **Note:** The CLI supports primitive types (integers, floats, booleans, strings). Arrays can be passed as comma-delimited strings (e.g., `param:"1,2,3"`). Hashes are not currently supported. ``` -------------------------------- ### Install plugins on a machine Source: https://docs.fastlane.tools/plugins/using-plugins Ensures all plugins defined in the `fastlane/Pluginfile` are installed on the local machine. This may require administrator privileges to install Ruby gems. ```bash fastlane install_plugins ``` -------------------------------- ### CLI Usage Source: https://docs.fastlane.tools/actions/setup_jenkins How to run the setup_jenkins action directly from the command line. ```APIDOC ## CLI To run the `setup_jenkins` action from the command line: ```bash fastlane run setup_jenkins ``` To pass parameters, use the colon syntax: ```bash fastlane run setup_jenkins parameter1:"value1" parameter2:"value2" ``` **Note:** The CLI supports primitive types (integers, floats, booleans, strings). Arrays can be passed as comma-delimited strings (e.g., `param:"1,2,3"`). Hashes are not currently supported. ``` -------------------------------- ### Install Fastlane Source: https://docs.fastlane.tools/advanced/lanes Install fastlane using RubyGems or Homebrew. ```bash sudo gem install fastlane -NV ``` ```bash brew install fastlane ``` -------------------------------- ### Install fastlane Source: https://docs.fastlane.tools/advanced/fastlane Installation methods using RubyGems or Homebrew. ```bash # Using RubyGems sudo gem install fastlane -NV # Alternatively using Homebrew brew install fastlane ``` -------------------------------- ### View action documentation Source: https://docs.fastlane.tools/actions/installr Command to display the documentation for the installr action in the terminal. ```bash fastlane action installr ``` -------------------------------- ### Action: bundle_install Source: https://docs.fastlane.tools/actions/bundle_install Documentation for the bundle_install action, including available parameters and usage examples. ```APIDOC ## bundle_install ### Description This action runs `bundle install` (if available) to manage Ruby gem dependencies. ### Parameters - **binstubs** (string) - Optional - Generate bin stubs for bundled gems to ./bin - **clean** (boolean) - Optional - Run bundle clean automatically after install (Default: false) - **full_index** (boolean) - Optional - Use the rubygems modern index instead of the API endpoint (Default: false) - **gemfile** (string) - Optional - Use the specified gemfile instead of Gemfile - **jobs** (integer) - Optional - Install gems using parallel workers - **local** (boolean) - Optional - Do not attempt to fetch gems remotely and use the gem cache instead (Default: false) - **deployment** (boolean) - Optional - Install using defaults tuned for deployment and CI environments (Default: false) - **no_cache** (boolean) - Optional - Don't update the existing gem cache (Default: false) - **no_prune** (boolean) - Optional - Don't remove stale gems from the cache (Default: false) - **path** (string) - Optional - Specify a different path than the system default - **system** (boolean) - Optional - Install to the system location even if the bundle was previously installed somewhere else (Default: false) - **quiet** (boolean) - Optional - Only output warnings and errors (Default: false) - **retry** (integer) - Optional - Retry network and git requests that have failed - **shebang** (string) - Optional - Specify a different shebang executable name - **standalone** (string) - Optional - Make a bundle that can work without the Bundler runtime - **trust_policy** (string) - Optional - Sets level of security (LowSecurity, MediumSecurity, HighSecurity) - **without** (string) - Optional - Exclude gems that are part of the specified named group - **with** (string) - Optional - Include gems that are part of the specified named group - **frozen** (boolean) - Optional - Don't allow the Gemfile.lock to be updated after install (Default: false) - **redownload** (boolean) - Optional - Force download every gem (Default: false) ### CLI Usage Run the action from the terminal: `fastlane run bundle_install` Pass parameters using the colon syntax: `fastlane run bundle_install parameter1:"value1" parameter2:"value2"` ``` -------------------------------- ### Example usage of rocket action Source: https://docs.fastlane.tools/actions/rocket This is an example of how to use the rocket action. ```ruby rocket ``` -------------------------------- ### Configure setup_ci in Fastfile Source: https://docs.fastlane.tools/actions/setup_ci Examples of calling setup_ci with various provider and timeout configurations. ```ruby setup_ci( provider: "circleci" ) ``` ```ruby setup_ci( provider: "circleci", timeout: 0 ) ``` ```ruby setup_ci( provider: "circleci", timeout: 0, keychain_name: "custom_keychain_name" ) ``` -------------------------------- ### Usage Example Source: https://docs.fastlane.tools/actions/recreate_schemes An example of how to use the recreate_schemes action within a Fastfile. ```APIDOC ## Example Usage in Fastfile ```ruby lane :recreate_my_schemes do recreate_schemes(project: "./path/to/MyApp.xcodeproj") end ``` ``` -------------------------------- ### Show download action documentation Source: https://docs.fastlane.tools/actions/download Run this command in your terminal to display the documentation for the download action directly. ```bash fastlane action download ``` -------------------------------- ### Appledoc Action Example Source: https://docs.fastlane.tools/actions/appledoc An example of how to use the appledoc action in a Fastfile. ```APIDOC ## POST /appledoc ### Description Generates Apple-like source code documentation from the source code. Runs `appledoc [OPTIONS] ` for the project. ### Method POST ### Endpoint /appledoc ### Parameters #### Request Body - **project_name** (String) - Optional - Project name - **project_company** (String) - Optional - Project company - **input** (Array) - Required - Path(s) to source file directories or individual source files. Accepts a single path or an array of paths - **ignore** (Array) - Optional - Ignore given path - **options** (String) - Optional - Documentation generation options - **warnings** (String) - Optional - Documentation generation warnings ### Request Example ```json { "project_name": "MyProjectName", "project_company": "Company Name", "input": [ "MyProjectSources", "MyProjectSourceFile.h" ], "ignore": [ "ignore/path/1", "ignore/path/2" ], "options": "--keep-intermediate-files --search-undocumented-doc", "warnings": "--warn-missing-output-path --warn-missing-company-id" } ``` ### Response #### Success Response (200) - **SharedValues::APPLEDOC_DOCUMENTATION_OUTPUT** (String) - Documentation set output path #### Response Example ```json { "output_path": "path/to/documentation" } ``` ``` -------------------------------- ### Install fastlane gem Source: https://docs.fastlane.tools/actions/capture_android_screenshots Install the fastlane gem to access screengrab functionality. ```bash gem install fastlane ``` -------------------------------- ### View action documentation Source: https://docs.fastlane.tools/actions/tryouts Command to display the documentation for the tryouts action in the terminal. ```bash fastlane action tryouts ``` -------------------------------- ### Build macOS App with Options Source: https://docs.fastlane.tools/actions/build_mac_app This example demonstrates building a macOS app with various options, including configuration, silent mode, cleaning, output directory, output name, and SDK selection. ```ruby build_mac_app( workspace: "MyApp.xcworkspace", configuration: "Debug", scheme: "MyApp", silent: true, clean: true, output_directory: "path/to/dir", # Destination directory. Defaults to current directory. output_name: "my-app.ipa", # specify the name of the .ipa file to generate (including file extension) sdk: "iOS 11.1" # use SDK as the name or path of the base SDK when building the project. ) ``` -------------------------------- ### Example Usage of xcarchive Source: https://docs.fastlane.tools/actions/xcarchive This is a basic example of how to use the xcarchive action in a Fastfile. ```ruby xcarchive ``` -------------------------------- ### Download All Provisioning Profiles Source: https://docs.fastlane.tools/actions/get_provisioning_profile Use the `download_all` command to download all available provisioning profiles. ```bash fastlane sigh download_all ``` -------------------------------- ### Fastfile Usage Example Source: https://docs.fastlane.tools/actions/ifttt Example of how to use the ifttt action within your Fastfile. ```APIDOC ## Fastfile Example ```ruby lane :send_ifttt_notification do ifttt( api_key: ENV["IFTTT_API_KEY"], event_name: "build_finished", value1: "Successfully deployed version #{version_number}" ) end ``` ``` -------------------------------- ### Start Jenkins Service Source: https://docs.fastlane.tools/best-practices/continuous-integration/jenkins Start the Jenkins service using Homebrew services. ```bash brew services start jenkins-lts ``` -------------------------------- ### List Available Options Source: https://docs.fastlane.tools/actions/get_push_certificate Display all available configuration options for the action. ```bash fastlane action pem ``` -------------------------------- ### View action documentation Source: https://docs.fastlane.tools/actions/adb_devices Run this command in the terminal to display the documentation for the adb_devices action. ```bash fastlane action adb_devices ``` -------------------------------- ### Install development dependencies Source: https://docs.fastlane.tools/plugins/plugins-troubleshooting Command to install dependencies required for local plugin development. ```bash bundle install --with development ``` -------------------------------- ### setup_ci Action Source: https://docs.fastlane.tools/actions/setup_ci Configures the environment for CI by creating a temporary keychain and setting match to readonly mode. ```APIDOC ## setup_ci ### Description Sets up the keychain and match to work with CI. It creates a temporary keychain, switches match to readonly mode, and configures log/test result paths. ### Parameters - **force** (boolean) - Optional - Force setup, even if not executed by CI. Default: false - **provider** (string) - Optional - CI provider. If none is set, the provider is detected automatically. - **timeout** (integer) - Optional - Set a custom timeout in seconds for keychain. Set 0 if you want to specify 'no time-out'. Default: 3600 - **keychain_name** (string) - Optional - Set a custom keychain name. Default: fastlane_tmp_keychain ### Usage Example ```ruby setup_ci( provider: "circleci", timeout: 0, keychain_name: "custom_keychain_name" ) ``` ``` -------------------------------- ### Display setup_jenkins Action Documentation Source: https://docs.fastlane.tools/actions/setup_jenkins To view the detailed documentation for the setup_jenkins action directly in your terminal, use this command. ```bash fastlane action setup_jenkins ``` -------------------------------- ### setup_jenkins Action Source: https://docs.fastlane.tools/actions/setup_jenkins This action configures your project for easier Jenkins integration by setting up keychains, code signing, and output directories. ```APIDOC ## POST /setup_jenkins ### Description Setup xcodebuild, gym and scan for easier Jenkins integration. This action adds and unlocks keychains, sets code signing identities, and configures output and derived data paths for CI environments. ### Method POST ### Endpoint /setup_jenkins ### Parameters #### Query Parameters - **force** (Boolean) - Optional - Force setup, even if not executed by Jenkins - **unlock_keychain** (Boolean) - Optional - Unlocks keychain. Default: `true` - **add_keychain_to_search_list** (String) - Optional - Add to keychain search list, valid values are true, false, :add, and :replace. Default: `:replace` - **set_default_keychain** (Boolean) - Optional - Set keychain as default. Default: `true` - **keychain_path** (String) - Optional - Path to keychain. - **keychain_password** (String) - Optional - Keychain password. Default: `''` - **set_code_signing_identity** (Boolean) - Optional - Set code signing identity from CODE_SIGNING_IDENTITY environment. Default: `true` - **code_signing_identity** (String) - Optional - Code signing identity. - **output_directory** (String) - Optional - The directory in which the ipa file should be stored in. Default: `./output` - **derived_data_path** (String) - Optional - The directory where built products and other derived data will go. Default: `./derivedData` - **result_bundle** (Boolean) - Optional - Produce the result bundle describing what occurred will be placed. Default: `true` ### Request Example ```json { "setup_jenkins": { "force": true, "unlock_keychain": true, "add_keychain_to_search_list": ":add", "set_default_keychain": false, "keychain_path": "/path/to/my.keychain", "keychain_password": "my_password", "set_code_signing_identity": true, "code_signing_identity": "Apple Distribution", "output_directory": "./build/ios", "derived_data_path": "./build/derived_data", "result_bundle": false } } ``` ### Response #### Success Response (200) - **message** (String) - A success message indicating the setup was completed. #### Response Example ```json { "message": "Jenkins setup complete. Keychains unlocked and configured." } ``` ``` -------------------------------- ### Cert Action - Examples Source: https://docs.fastlane.tools/actions/cert Various examples of how to call the cert action with different parameters. ```APIDOC ## Examples ```ruby # Basic usage (alias for get_certificates) cert # Get certificates for a specific user cert(username: "user@email.com") # Create a development certificate cert(development: true) # Create a specific type of certificate (e.g., Apple Distribution) cert(type: "Apple Distribution") # Force creation of a certificate even if one exists cert(force: true) # Create certificates for Xcode 11 and later cert(generate_apple_certs: true) # Use with App Store Connect API Key cert(api_key_path: "/path/to/AuthKey.json") # Specify team ID and name cert(team_id: "YOUR_TEAM_ID", team_name: "Your Team Name") # Store certificate with a specific filename cert(filename: "my_cert.p12") # Specify output path for certificates and keys cert(output_path: "./certs") # Use a custom keychain cert(keychain_path: "/path/to/my.keychain", keychain_password: "my_password") ``` ``` -------------------------------- ### Badge Action - Examples Source: https://docs.fastlane.tools/actions/badge Illustrative examples of using the badge action with different parameters. ```APIDOC ## Examples ```ruby badge(dark: true) ``` ```ruby badge(alpha: true) ``` ```ruby badge(custom: "/Users/xxx/Desktop/badge.png") ``` ```ruby badge(shield: "Version-0.0.3-blue", no_badge: true) ``` ``` -------------------------------- ### View xcode_install Action Documentation Source: https://docs.fastlane.tools/actions/xcode_install To display detailed documentation for the xcode_install action directly in your terminal, use this command. ```bash fastlane action xcode_install ``` -------------------------------- ### Install fastlane using Homebrew Source: https://docs.fastlane.tools/advanced/Appfile Installs the fastlane toolset using the Homebrew package manager. ```bash brew install fastlane ``` -------------------------------- ### View action documentation Source: https://docs.fastlane.tools/actions/register_devices Display the documentation for the register_devices action in the terminal. ```bash fastlane action register_devices ``` -------------------------------- ### Install fastlane using RubyGems Source: https://docs.fastlane.tools/advanced/Appfile Installs the fastlane toolset using the RubyGems package manager. ```bash sudo gem install fastlane -NV ``` -------------------------------- ### Display Action Documentation Source: https://docs.fastlane.tools/actions/create_app_online To view the documentation for the `create_app_online` action directly in your terminal, run this command. ```bash fastlane action create_app_online ``` -------------------------------- ### install_xcode_plugin Source: https://docs.fastlane.tools/actions/install_xcode_plugin Installs an Xcode plugin for the current user. Supports installation from a URL or a GitHub repository. ```APIDOC ## POST /install_xcode_plugin ### Description Installs an Xcode plugin for the current user. ### Method POST ### Endpoint /install_xcode_plugin ### Parameters #### Query Parameters - **url** (String) - Optional - URL for Xcode plugin ZIP file - **github** (String) - Optional - GitHub repository URL for Xcode plugin ### Request Example ```json { "url": "https://example.com/clubmate/plugin.zip" } ``` ### Request Example ```json { "github": "https://github.com/contentful/ContentfulXcodePlugin" } ``` ### Response #### Success Response (200) - **message** (String) - Indicates successful installation. #### Response Example ```json { "message": "Xcode plugin installed successfully." } ``` ``` -------------------------------- ### Install xcbeautify using Homebrew Source: https://docs.fastlane.tools/best-practices/xcodebuild-formatters Command to install the xcbeautify formatter using the Homebrew package manager. ```bash $ brew install xcbeautify ``` -------------------------------- ### Run cert Action for Help Source: https://docs.fastlane.tools/actions/cert Displays available commands and options for the cert action. ```bash fastlane action cert ``` -------------------------------- ### Install screengrab gem Source: https://docs.fastlane.tools/getting-started/android/screenshots Install the screengrab gem, which is used for automating screenshot capture on Android devices. ```bash sudo gem install screengrab ``` -------------------------------- ### Run setup_jenkins Action with Parameters via CLI Source: https://docs.fastlane.tools/actions/setup_jenkins Demonstrates how to pass parameters to the setup_jenkins action when running it from the command line. Parameters are specified using the ':' symbol. ```bash fastlane run setup_jenkins parameter1:"value1" parameter2:"value2" ``` -------------------------------- ### install_on_device Action Source: https://docs.fastlane.tools/actions/install_on_device Installs an .ipa file on a connected iOS device. Requires ios-deploy to be installed on the system. ```APIDOC ## install_on_device ### Description Installs an .ipa file on a connected iOS-device via usb or wifi. If no id is given, the first found iOS device will be used. ### Parameters - **ipa** (string) - Required - The IPA file to put on the device - **device_id** (string) - Optional - id of the device / if not set defaults to first found device - **extra** (string) - Optional - Extra Command-line arguments passed to ios-deploy - **skip_wifi** (boolean) - Optional - Do not search for devices via WiFi ### Request Example install_on_device( device_id: "a3be6c9ff7e5c3c6028597513243b0f933b876d4", ipa: "./app.ipa" ) ``` -------------------------------- ### Swift Setup for Snapshot Source: https://docs.fastlane.tools/actions/capture_ios_screenshots Initialize the XCUIApplication and set up snapshotting before launching the app in your Swift UI tests. ```swift let app = XCUIApplication() snapshot(app) app.launch() ``` -------------------------------- ### Deploy to Beta and Notify Source: https://docs.fastlane.tools/getting-started/android/beta-deployment Example lane combining build, upload to Play Store, and Slack notification. ```ruby lane :beta do gradle(task: 'assemble', build_type: 'Release') upload_to_play_store(track: 'beta') slack(message: 'Successfully distributed a new beta build') end ``` -------------------------------- ### Install Jenkins via Homebrew Source: https://docs.fastlane.tools/best-practices/continuous-integration/jenkins Use Homebrew to update and install the long-term support version of Jenkins on macOS. ```bash brew update && brew install jenkins-lts ``` -------------------------------- ### Submit Build for Review (Fastfile) Source: https://docs.fastlane.tools/actions/appstore Automate the submission process within a `Fastfile` lane. This example configures `deliver` to submit the build, skipping metadata and screenshots. ```ruby lane :submit_review do deliver( build_number: '830', submit_for_review: true, automatic_release: true, force: true, # Skip HTMl report verification skip_metadata: true, skip_screenshots: true, skip_binary_upload: true ) end ``` -------------------------------- ### Using a Different Xcode Install Source: https://docs.fastlane.tools/actions/run_tests If you need to use a specific Xcode installation, you can set the `DEVELOPER_DIR` environment variable. ```APIDOC ## Using a Different Xcode Install ### Description Specify a different Xcode installation to use for running tests by setting the `DEVELOPER_DIR` environment variable. ### Method fastlane ### Endpoint scan ### Request Example ``` DEVELOPER_DIR="/Applications/Xcode6.2.app" scan ``` ``` -------------------------------- ### Display Action Documentation Source: https://docs.fastlane.tools/actions/app_store_connect_api_key Shows the documentation for the app_store_connect_api_key action in the terminal. ```bash fastlane action app_store_connect_api_key ``` -------------------------------- ### lcov Action - Example Usage Source: https://docs.fastlane.tools/actions/lcov An example of how to use the lcov action within a Fastfile to generate coverage reports. ```APIDOC ## POST /fastlane/actions/lcov ### Description Generates coverage data using lcov. ### Method POST ### Endpoint /fastlane/actions/lcov ### Parameters #### Request Body - **project_name** (String) - Required - Name of the project - **scheme** (String) - Required - Scheme of the project - **arch** (String) - Optional - The build arch where will search .gcda files. Default is `i386`. - **output_dir** (String) - Optional - The output directory that coverage data will be stored. If not passed will use coverage_reports as default value. Default is `coverage_reports`. ### Request Example ```json { "project_name": "ProjectName", "scheme": "yourScheme", "output_dir": "cov_reports" } ``` ### Response #### Success Response (200) - **message** (String) - Indicates successful generation of coverage data. #### Response Example ```json { "message": "Coverage data generated successfully." } ``` ``` -------------------------------- ### Configure xctool build with Fastfile parameters Source: https://docs.fastlane.tools/actions/xctool This example shows how to pass detailed build configurations directly within the Fastfile. It specifies workspace, scheme, configuration, SDK, and architecture. ```ruby xctool(:test, [ "--workspace", "'AwesomeApp.xcworkspace'", "--scheme", "'Schema Name'", "--configuration", "Debug", "--sdk", "iphonesimulator", "--arch", "i386" ].join(" ")) ``` -------------------------------- ### View Action Documentation Source: https://docs.fastlane.tools/actions/import Run this command in the terminal to display the documentation for the import action. ```bash fastlane action import ``` -------------------------------- ### Start Fastlane Runloop Source: https://docs.fastlane.tools/getting-started/ios/fastlane-swift Entry point code required to start the fastlane runloop in an executable SPM package. ```swift import Fastlane Main().run(with: Fastfile()) ``` -------------------------------- ### Show Documentation for upload_to_app_store Source: https://docs.fastlane.tools/actions/upload_to_app_store Run this command in your terminal to display the documentation for the upload_to_app_store action. ```bash fastlane action upload_to_app_store ``` -------------------------------- ### Install Bundler Source: https://docs.fastlane.tools/ Install the Bundler gem, a dependency manager for Ruby projects. This is a prerequisite for using a Gemfile to manage fastlane. ```bash gem install bundler ``` -------------------------------- ### Install Xcode Command Line Tools Source: https://docs.fastlane.tools/advanced/Appfile Installs the latest Xcode command line tools required for fastlane operations. ```bash xcode-select --install ``` -------------------------------- ### Deliver with Custom Metadata Path Source: https://docs.fastlane.tools/actions/appstore This example shows how to configure the deliver action in a Fastfile, specifying submission for review, forcing the upload, and providing a custom path for metadata. ```ruby deliver( submit_for_review: true, metadata_path: "../folder" ) ``` -------------------------------- ### Select Xcode by Exact Version Source: https://docs.fastlane.tools/actions/xcversion Use this to select a specific installed Xcode version. Ensure the version is installed on your system. ```ruby xcversion(version: "8.1") ``` -------------------------------- ### Execute setup_ci via CLI Source: https://docs.fastlane.tools/actions/setup_ci Commands to run the setup_ci action directly from the terminal, including parameter passing. ```bash fastlane run setup_ci ``` ```bash fastlane run setup_ci parameter1:"value1" parameter2:"value2" ``` -------------------------------- ### Download All Profiles Source: https://docs.fastlane.tools/actions/sigh Download all existing provisioning profiles. ```bash fastlane sigh download_all ``` ```bash fastlane sigh download_all --download_xcode_profiles ``` -------------------------------- ### Skip Installation of Provisioning Profile Source: https://docs.fastlane.tools/actions/get_provisioning_profile Use the `--skip_install` flag to generate the profile without installing it on the local machine. ```bash fastlane sigh --skip_install ``` -------------------------------- ### Run `pod install` with Fastlane Source: https://docs.fastlane.tools/actions/cocoapods Use this action to run `pod install` for your project. Ensure CocoaPods is set up in your project. ```ruby cocoapods ``` -------------------------------- ### Example Snapfile Configuration Source: https://docs.fastlane.tools/getting-started/ios/screenshots A template for the Snapfile used to define device lists, languages, and output directories for screenshot generation. ```Ruby # A list of devices you want to take the screenshots from # devices([ # "iPad (7th generation)", # "iPad Air (3rd generation)", # "iPad Pro (11-inch)", # "iPad Pro (12.9-inch) (3rd generation)", # "iPad Pro (9.7-inch)", # "iPhone 11", # "iPhone 11 Pro", # "iPhone 11 Pro Max", # "iPhone 8", # "iPhone 8 Plus" # ]) languages([ "en-US", "de-DE" ]) # The name of the scheme which contains the UI Tests # scheme "SchemeName" # Where should the resulting screenshots be stored? # output_directory "./screenshots" # clear_previous_screenshots true # remove the '#' to clear all previously generated screenshots before creating new ones # Choose which project/workspace to use # project "./Project.xcodeproj" # workspace "./Project.xcworkspace" # For more information about all available options run # fastlane action snapshot ``` -------------------------------- ### Show verify_build Action Documentation Source: https://docs.fastlane.tools/actions/verify_build Run this command in your terminal to display the documentation for the verify_build action. ```bash fastlane action verify_build ``` -------------------------------- ### Upload a build to Tryouts Source: https://docs.fastlane.tools/actions/tryouts Basic usage of the tryouts action within a Fastfile. ```ruby tryouts( api_token: "...", app_id: "application-id", build_file: "test.ipa", ) ```