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
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
2
3
4
5
Lane Parameters
Key | Description |
---|---|
app_store | Bool 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_name | The name of the resulting ipa file. Defaults to @app_name |
scheme | The project's scheme. Make sure it's marked as Shared. Defaults to @scheme |
configuration | The configuration to use when building the app. Defaults to 'Release' |
build_directory | The directory in which the ipa file should be stored in |
output_name | The name of the resulting ipa file. #{app_name}.ipa |
clean | Should the project be cleaned before building it? |
xcargs | Pass additional arguments to xcodebuild for the build phase. Be sure to quote the setting names and values e.g. OTHER_LDFLAGS="-ObjC -lstdc++" |
export_xcargs | Pass additional arguments to xcodebuild for the package phase. Be sure to quote the setting names and values e.g. OTHER_LDFLAGS="-ObjC -lstdc++" |
silent | Hide all information that's not necessary while building. Defaults to false |
include_bitcode | Should the ipa file include bitcode? Defaults to true |
codesigning_identity | The name of the code signing identity to use. It has to match the name exactly. e.g. 'iPhone Distribution: SunApps GmbH' |
analyze_build_time | Analyze the project build time and store the output in 'culprits.txt' file. Defaults to false |
skip_package_ipa | Should we skip packaging the ipa? Defaults to false |
skip_build_archive | Export ipa from previously built xarchive. Uses archive_path as source. Defaults to false |
should_add_badge | Should add a badge with the environment, build version and build number to app icon? Defaults to false |
provisioningProfiles | Specifies path to export provisioning Profiles. This path used for export_options in gym |