Skip to content

Instantly share code, notes, and snippets.

@sebalopez
Last active Sep 16, 2020
Embed
What would you like to do?
iOS Fastfile build lane
lane :prepare_keychain do
# Create keychain - (Travis setup works for GitHhub Actions too)
setup_ci(
force: true,
provider: "travis"
)
# Unlock keychain and set as default
unlock_keychain(
path: "fastlane_tmp_keychain",
password: "",
set_default: true
)
# Import .cer and .p12 - this is a workaround for fastlane match when we retrieve certs from a custom location
import_certificate(
certificate_path: key,
certificate_password: key_pwd,
keychain_name: "fastlane_tmp_keychain",
keychain_password: "",
log_output: true
)
import_certificate(
certificate_path: cert,
keychain_name: "fastlane_tmp_keychain",
keychain_password: "",
log_output: true
)
end
lane :build_and_sign do |options|
# pod install
cocoapods(
repo_update: true
)
# Build and Archive app
gym(
scheme: options[:scheme],
workspace: workspace,
export_method: options[:method],
clean: true,
output_name: options[:scheme]+".ipa",
export_team_id: team_id
)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment