You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fastlane now supports Individual API Key with #21959. However, when I run deliver with an Individual API Key, the following error occurs.
[19:13:05]: [altool] NSLocalizedDescription = "Unable to upload archive.";
[19:13:05]: [altool] NSLocalizedFailureReason = "--upload-app is missing one or more required options: --type.";
At the time error occured, deliver was calling the command like the following.
This command is invalid. --apiIssuer needs an argument but it is not passed. Instead, the next option flag -t is considered as the argument of --apiIssuer, so altool complains that there's no --type option.
Deliver is internally divided into 2 steps, a metadata upload step and a build upload phase.
Individual API Key works fine in the former, but fails in the latter.
This is because the altool used by deliver has not yet supported Individual API Keys.
Individual API Keys do not have an issuer ID, but altool requires you to enter an issuer ID.
As a workaround, you can force the deliverer to use an app-specific password instead of an API key when using altool by writing a snippet like the following in your Fastfile.
⚠️ This monkey patch is too naive. I don't recommend applying it unless you know what you do.
require"deliver"# Monkey patch for https://github.com/fastlane/fastlane/blob/2.221.1/deliver/lib/deliver/runner.rb#L270class ::Deliver::Runner# Force deliver use app-specific password instead of API keydeftransporter_for_selected_teamtunes_client=Spaceship::ConnectAPI.client.tunes_clientgeneric_transporter=FastlaneCore::ItunesTransporter.new(options[:username],nil,false,options[:itc_provider],altool_compatible_command: true)returngeneric_transporterunlessoptions[:itc_provider].nil? && tunes_client.teams.count > 1beginteam=tunes_client.teams.find{ |t| t['providerId'].to_s == tunes_client.team_id}name=team['name']provider_id=generic_transporter.provider_ids[name]UI.verbose("Inferred provider id #{provider_id} for team #{name}.")returnFastlaneCore::ItunesTransporter.new(options[:username],nil,false,provider_id,altool_compatible_command: true,api_key: api_key)rescue=>exUI.verbose("Couldn't infer a provider short name for team with id #{tunes_client.team_id} automatically: #{ex}. Proceeding without provider short name.")returngeneric_transporterendendend
I confirmed it worked well.
Command executed
$ fastlane run deliver
...
[19:13:05]: [altool] NSLocalizedDescription = "Unable to upload archive.";
[19:13:05]: [altool] NSLocalizedFailureReason = "--upload-app is missing one or more required options: --type.";
...
Environment
fastlane 2.221.1
The text was updated successfully, but these errors were encountered:
New Issue Checklist
Issue Description
fastlane now supports Individual API Key with #21959. However, when I run deliver with an Individual API Key, the following error occurs.
At the time error occured,
deliver
was calling the command like the following.This command is invalid.
--apiIssuer
needs an argument but it is not passed. Instead, the next option flag-t
is considered as the argument of--apiIssuer
, soaltool
complains that there's no--type
option.Deliver is internally divided into 2 steps, a metadata upload step and a build upload phase.
Individual API Key works fine in the former, but fails in the latter.
This is because the
altool
used by deliver has not yet supported Individual API Keys.Individual API Keys do not have an issuer ID, but
altool
requires you to enter an issuer ID.As a workaround, you can force the deliverer to use an app-specific password instead of an API key when using
altool
by writing a snippet like the following in your Fastfile.I confirmed it worked well.
Command executed
Environment
The text was updated successfully, but these errors were encountered: