Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[action][update_code_signing_settings] add sdk key to update_code_signing_settings #20655

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
18 changes: 14 additions & 4 deletions fastlane/lib/fastlane/actions/update_code_signing_settings.rb
Expand Up @@ -36,18 +36,22 @@ def self.run(params)
end

style_value = params[:use_automatic_signing] ? 'Automatic' : 'Manual'
development_team_setting = params[:sdk] ? "DEVELOPMENT_TEAM[sdk=#{params[:sdk]}]" : "DEVELOPMENT_TEAM"
code_sign_identity_setting = params[:sdk] ? "CODE_SIGN_IDENTITY[sdk=#{params[:sdk]}]" : "CODE_SIGN_IDENTITY"
provisioning_profile_setting = params[:sdk] ? "PROVISIONING_PROFILE_SPECIFIER[sdk=#{params[:sdk]}]" : "PROVISIONING_PROFILE_SPECIFIER"

set_build_setting(config, "CODE_SIGN_STYLE", style_value)

if params[:team_id]
set_build_setting(config, "DEVELOPMENT_TEAM", params[:team_id])
set_build_setting(config, development_team_setting, params[:team_id])
UI.important("Set Team id to: #{params[:team_id]} for target: #{target.name} for build configuration: #{config.name}")
end
if params[:code_sign_identity]
set_build_setting(config, "CODE_SIGN_IDENTITY", params[:code_sign_identity])
set_build_setting(config, code_sign_identity_setting, params[:code_sign_identity])
UI.important("Set Code Sign identity to: #{params[:code_sign_identity]} for target: #{target.name} for build configuration: #{config.name}")
end
if params[:profile_name]
set_build_setting(config, "PROVISIONING_PROFILE_SPECIFIER", params[:profile_name])
set_build_setting(config, provisioning_profile_setting, params[:profile_name])
UI.important("Set Provisioning Profile name to: #{params[:profile_name]} for target: #{target.name} for build configuration: #{config.name}")
end
if params[:entitlements_file_path]
Expand Down Expand Up @@ -129,6 +133,10 @@ def self.available_options
description: "Defines if project should use automatic signing",
type: Boolean,
default_value: false),
FastlaneCore::ConfigItem.new(key: :sdk,
env_name: "FASTLANE_BUILD_SDK",
optional: true,
description: "Build target SDKs (iphoneos*, macosx*, iphonesimulator*)"),
FastlaneCore::ConfigItem.new(key: :team_id,
env_name: "FASTLANE_TEAM_ID",
optional: true,
Expand Down Expand Up @@ -183,10 +191,12 @@ def self.example_code
)',
' # more advanced manual code signing
update_code_signing_settings(
use_automatic_signing: true,
use_automatic_signing: false,
path: "demo-project/demo/demo.xcodeproj",
team_id: "QABC123DEV",
bundle_identifier: "com.demoapp.QABC123DEV",
code_sign_identity: "iPhone Distribution",
sdk: "iphoneos*",
profile_name: "Demo App Deployment Profile",
entitlements_file_path: "Demo App/generated/New.entitlements"
)'
Expand Down