pilot/lib/pilot/build_manager.rb in fastlane-2.222.0 vs pilot/lib/pilot/build_manager.rb in fastlane-2.223.0
- old
+ new
@@ -389,10 +389,11 @@
builds_to_expire.each(&:expire!)
end
# If App Store Connect API token, use token.
+ # If api_key is specified and it is an Individual API Key, don't use token but use username.
# If itc_provider was explicitly specified, use it.
# If there are multiple teams, infer the provider from the selected team name.
# If there are fewer than two teams, don't infer the provider.
def transporter_for_selected_team(options)
# Use JWT auth
@@ -404,9 +405,17 @@
api_key = options[:api_key].transform_keys(&:to_sym).dup
# key is still base 64 style if api_key is loaded from option
api_key[:key] = Base64.decode64(api_key[:key]) if api_key[:is_key_content_base64]
api_key
end
+
+ # Currently no kind of transporters accept an Individual API Key. Use username and app-specific password instead.
+ # See https://github.com/fastlane/fastlane/issues/22115
+ is_individual_key = !api_key.nil? && api_key[:issuer_id].nil?
+ if is_individual_key
+ api_key = nil
+ api_token = nil
+ end
unless api_token.nil?
api_token.refresh! if api_token.expired?
return FastlaneCore::ItunesTransporter.new(nil, nil, false, nil, api_token.text, altool_compatible_command: true, api_key: api_key)
end