Lane: build

Description

This lane is a custom wrapper above build_ios_appopen in new window (old gym) from fastlane with some additional parameters. build uses increment_build_number to increase the build number by 1 (so each build number is unique per iTunes Connect’s upload requirement).

gym builds and packages iOS apps for you. It takes care of all the heavy lifting and makes it super easy to generate a signed ipa 💪

Available

fastlane_configurations ~> 1.0.0

Overview

lane :build do |options|

    app_store = options[:app_store] || false
    app_name = options[:app_name] || @app_name
    scheme = options[:scheme] || @scheme
    configuration = options[:configuration] || 'Release'
    build_directory = options[:build_directory] || default_build_directory
    clean = options[:clean] || true
    xcargs = options[:xcargs]
    export_xcargs = options[:export_xcargs]
    silent = options[:silent] || false
    include_bitcode = options[:include_bitcode] || true
    codesigning_identity = options[:codesigning_identity]
    analyze_build_time = options[:analyze_build_time] || false
    skip_package_ipa = options[:skip_package_ipa] || false
    skip_build_archive = options[:skip_build_archive] || false
    should_add_badge = options[:should_add_badge] || false
    provisioningProfiles = options[:provisioningProfiles]

  end
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20

Usage

Update your Fastfile to contain the following code:

build(
  app_store: true, 
  app_name: @app_name,
  scheme: @scheme
)
1
2
3
4
5

Lane Parameters

KeyDescription
app_storeBool value used for set necessary method for export_method in gym. app-store for true value , ad-hoc for false value. Defaults to false
app_nameThe name of the resulting ipa file. Defaults to @app_name
schemeThe project's scheme. Make sure it's marked as Shared. Defaults to @scheme
configurationThe configuration to use when building the app. Defaults to 'Release'
build_directoryThe directory in which the ipa file should be stored in
output_nameThe name of the resulting ipa file. #{app_name}.ipa
cleanShould the project be cleaned before building it?
xcargsPass additional arguments to xcodebuild for the build phase. Be sure to quote the setting names and values e.g. OTHER_LDFLAGS="-ObjC -lstdc++"
export_xcargsPass additional arguments to xcodebuild for the package phase. Be sure to quote the setting names and values e.g. OTHER_LDFLAGS="-ObjC -lstdc++"
silentHide all information that's not necessary while building. Defaults to false
include_bitcodeShould the ipa file include bitcode? Defaults to true
codesigning_identityThe name of the code signing identity to use. It has to match the name exactly. e.g. 'iPhone Distribution: SunApps GmbH'
analyze_build_timeAnalyze the project build time and store the output in 'culprits.txt' file. Defaults to false
skip_package_ipaShould we skip packaging the ipa? Defaults to false
skip_build_archiveExport ipa from previously built xarchive. Uses archive_path as source. Defaults to false
should_add_badgeShould add a badge with the environment, build version and build number to app icon? Defaults to false
provisioningProfilesSpecifies path to export provisioning Profiles. This path used for export_options in gym