fastlane 2.98.0 → 2.99.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +70 -70
- data/credentials_manager/lib/credentials_manager/appfile_config.rb +1 -1
- data/deliver/lib/assets/DeliverfileDefault +1 -1
- data/deliver/lib/assets/DeliverfileDefault.swift +1 -1
- data/deliver/lib/assets/summary.html.erb +1 -1
- data/deliver/lib/deliver/commands_generator.rb +2 -2
- data/deliver/lib/deliver/detect_values.rb +1 -1
- data/deliver/lib/deliver/download_screenshots.rb +1 -1
- data/deliver/lib/deliver/options.rb +3 -3
- data/deliver/lib/deliver/runner.rb +9 -9
- data/deliver/lib/deliver/submit_for_review.rb +3 -3
- data/deliver/lib/deliver/upload_metadata.rb +3 -3
- data/deliver/lib/deliver/upload_screenshots.rb +2 -2
- data/fastlane/lib/fastlane/actions/app_store_build_number.rb +3 -3
- data/fastlane/lib/fastlane/actions/cocoapods.rb +1 -0
- data/fastlane/lib/fastlane/actions/create_app_online.rb +1 -1
- data/fastlane/lib/fastlane/actions/docs/check_app_store_metadata.md +3 -3
- data/fastlane/lib/fastlane/actions/docs/create_app_online.md +8 -8
- data/fastlane/lib/fastlane/actions/docs/frame_screenshots.md +1 -1
- data/fastlane/lib/fastlane/actions/docs/sync_code_signing.md +2 -2
- data/fastlane/lib/fastlane/actions/docs/upload_to_app_store.md.erb +14 -14
- data/fastlane/lib/fastlane/actions/docs/upload_to_testflight.md +2 -2
- data/fastlane/lib/fastlane/actions/download_dsyms.rb +7 -7
- data/fastlane/lib/fastlane/actions/github_api.rb +2 -0
- data/fastlane/lib/fastlane/actions/latest_testflight_build_number.rb +2 -2
- data/fastlane/lib/fastlane/actions/set_changelog.rb +6 -6
- data/fastlane/lib/fastlane/actions/upload_to_app_store.rb +1 -1
- data/fastlane/lib/fastlane/actions/upload_to_testflight.rb +1 -1
- data/fastlane/lib/fastlane/command_line_handler.rb +2 -2
- data/fastlane/lib/fastlane/commands_generator.rb +1 -0
- data/fastlane/lib/fastlane/fast_file.rb +8 -6
- data/fastlane/lib/fastlane/lane_manager.rb +0 -3
- data/fastlane/lib/fastlane/runner.rb +1 -9
- data/fastlane/lib/fastlane/server/socket_server.rb +4 -2
- data/fastlane/lib/fastlane/setup/setup_ios.rb +12 -12
- data/fastlane/lib/fastlane/swift_lane_manager.rb +9 -8
- data/fastlane/lib/fastlane/version.rb +1 -1
- data/fastlane/swift/Appfile.swift +1 -1
- data/fastlane/swift/ArgumentProcessor.swift +3 -1
- data/fastlane/swift/ControlCommand.swift +0 -1
- data/fastlane/swift/Deliverfile.swift +1 -1
- data/fastlane/swift/Fastlane.swift +3 -3
- data/fastlane/swift/Gymfile.swift +1 -1
- data/fastlane/swift/LaneFileProtocol.swift +0 -1
- data/fastlane/swift/Matchfile.swift +1 -1
- data/fastlane/swift/Precheckfile.swift +1 -1
- data/fastlane/swift/RubyCommand.swift +0 -1
- data/fastlane/swift/RubyCommandable.swift +0 -1
- data/fastlane/swift/Runner.swift +7 -7
- data/fastlane/swift/RunnerArgument.swift +0 -1
- data/fastlane/swift/Scanfile.swift +1 -1
- data/fastlane/swift/Screengrabfile.swift +1 -1
- data/fastlane/swift/Snapshotfile.swift +1 -1
- data/fastlane/swift/SocketClient.swift +0 -1
- data/fastlane/swift/SocketClientDelegateProtocol.swift +0 -1
- data/fastlane/swift/SocketResponse.swift +0 -1
- data/fastlane/swift/main.swift +2 -2
- data/fastlane_core/lib/fastlane_core/analytics/analytics_event_builder.rb +10 -39
- data/fastlane_core/lib/fastlane_core/analytics/analytics_ingester_client.rb +34 -30
- data/fastlane_core/lib/fastlane_core/analytics/analytics_session.rb +16 -176
- data/fastlane_core/lib/fastlane_core/analytics/app_identifier_guesser.rb +1 -1
- data/fastlane_core/lib/fastlane_core/build_watcher.rb +2 -2
- data/fastlane_core/lib/fastlane_core/itunes_transporter.rb +8 -8
- data/fastlane_core/lib/fastlane_core/module.rb +2 -5
- data/fastlane_core/lib/fastlane_core/ui/errors/fastlane_error.rb +0 -1
- data/fastlane_core/lib/fastlane_core/ui/fastlane_runner.rb +5 -7
- data/gym/lib/gym/detect_values.rb +23 -0
- data/gym/lib/gym/generators/package_command_generator_xcode7.rb +1 -21
- data/match/lib/match/spaceship_ensure.rb +1 -1
- data/pilot/lib/pilot/build_manager.rb +2 -2
- data/pilot/lib/pilot/manager.rb +2 -2
- data/pilot/lib/pilot/options.rb +4 -4
- data/precheck/lib/precheck/options.rb +2 -2
- data/produce/lib/produce/commands_generator.rb +1 -1
- data/produce/lib/produce/developer_center.rb +1 -1
- data/produce/lib/produce/itunes_connect.rb +6 -6
- data/produce/lib/produce/options.rb +4 -4
- data/scan/lib/scan/test_command_generator.rb +6 -2
- data/screengrab/lib/screengrab/runner.rb +2 -2
- data/sigh/lib/sigh/runner.rb +6 -1
- data/snapshot/lib/assets/SnapshotHelper.swift +0 -1
- data/snapshot/lib/assets/SnapshotHelperXcode8.swift +0 -1
- data/spaceship/README.md +3 -3
- data/spaceship/lib/spaceship.rb +1 -1
- data/spaceship/lib/spaceship/client.rb +12 -7
- data/spaceship/lib/spaceship/du/du_client.rb +1 -1
- data/spaceship/lib/spaceship/errors.rb +1 -1
- data/spaceship/lib/spaceship/module.rb +1 -1
- data/spaceship/lib/spaceship/playground.rb +3 -3
- data/spaceship/lib/spaceship/portal/portal_client.rb +2 -2
- data/spaceship/lib/spaceship/spaceauth_runner.rb +5 -5
- data/spaceship/lib/spaceship/test_flight/client.rb +12 -1
- data/spaceship/lib/spaceship/test_flight/group.rb +1 -1
- data/spaceship/lib/spaceship/test_flight/tester.rb +1 -1
- data/spaceship/lib/spaceship/tunes/app_analytics.rb +143 -0
- data/spaceship/lib/spaceship/tunes/app_details.rb +1 -1
- data/spaceship/lib/spaceship/tunes/app_image.rb +1 -1
- data/spaceship/lib/spaceship/tunes/app_screenshot.rb +1 -1
- data/spaceship/lib/spaceship/tunes/app_status.rb +2 -2
- data/spaceship/lib/spaceship/tunes/app_submission.rb +1 -1
- data/spaceship/lib/spaceship/tunes/app_trailer.rb +1 -1
- data/spaceship/lib/spaceship/tunes/app_version.rb +6 -6
- data/spaceship/lib/spaceship/tunes/app_version_history.rb +1 -1
- data/spaceship/lib/spaceship/tunes/app_version_states_history.rb +1 -1
- data/spaceship/lib/spaceship/tunes/application.rb +15 -4
- data/spaceship/lib/spaceship/tunes/availability.rb +24 -8
- data/spaceship/lib/spaceship/tunes/b2b_user.rb +7 -2
- data/spaceship/lib/spaceship/tunes/build.rb +2 -2
- data/spaceship/lib/spaceship/tunes/build_details.rb +1 -1
- data/spaceship/lib/spaceship/tunes/build_train.rb +2 -2
- data/spaceship/lib/spaceship/tunes/errors.rb +1 -1
- data/spaceship/lib/spaceship/tunes/iap.rb +2 -2
- data/spaceship/lib/spaceship/tunes/iap_status.rb +1 -1
- data/spaceship/lib/spaceship/tunes/iap_type.rb +1 -1
- data/spaceship/lib/spaceship/tunes/tunes.rb +1 -0
- data/spaceship/lib/spaceship/tunes/tunes_client.rb +41 -13
- data/spaceship/lib/spaceship/two_step_client.rb +1 -1
- metadata +15 -14
@@ -12,14 +12,11 @@ module FastlaneCore
|
|
12
12
|
# Specifically, in AnalyticsSession.finalize_session
|
13
13
|
# Learn more at https://docs.fastlane.tools/#metrics
|
14
14
|
def self.session
|
15
|
-
|
16
|
-
# https://github.com/fastlane/fastlane/issues/11913
|
17
|
-
# @session ||= AnalyticsSession.new
|
15
|
+
@session ||= AnalyticsSession.new
|
18
16
|
end
|
19
17
|
|
20
18
|
def self.reset_session
|
21
|
-
|
22
|
-
# @session = nil
|
19
|
+
@session = nil
|
23
20
|
end
|
24
21
|
|
25
22
|
# A directory that's being used to user-wide fastlane configs
|
@@ -68,9 +68,8 @@ module Commander
|
|
68
68
|
FastlaneCore::UI.user_error!("fastlane requires a minimum version of Xcode #{Fastlane::MINIMUM_XCODE_RELEASE}, please upgrade and make sure to use `sudo xcode-select -s /Applications/Xcode.app`")
|
69
69
|
end
|
70
70
|
|
71
|
-
|
72
|
-
|
73
|
-
# FastlaneCore.session.action_launched(launch_context: action_launch_context)
|
71
|
+
action_launch_context = FastlaneCore::ActionLaunchContext.context_for_action_name(@program[:name], args: ARGV)
|
72
|
+
FastlaneCore.session.action_launched(launch_context: action_launch_context)
|
74
73
|
|
75
74
|
return_value = run_active_command
|
76
75
|
|
@@ -128,9 +127,8 @@ module Commander
|
|
128
127
|
rescue_connection_failed_error(e)
|
129
128
|
rescue => e # high chance this is actually FastlaneCore::Interface::FastlaneCrash, but can be anything else
|
130
129
|
rescue_unknown_error(e)
|
131
|
-
|
132
|
-
|
133
|
-
# FastlaneCore.session.finalize_session
|
130
|
+
ensure
|
131
|
+
FastlaneCore.session.finalize_session
|
134
132
|
end
|
135
133
|
end
|
136
134
|
|
@@ -173,7 +171,7 @@ module Commander
|
|
173
171
|
end
|
174
172
|
|
175
173
|
def handle_tls_error!(e)
|
176
|
-
# Apple has upgraded its
|
174
|
+
# Apple has upgraded its App Store Connect servers to require TLS 1.2, but
|
177
175
|
# system Ruby 2.0 does not support it. We want to suggest that users upgrade
|
178
176
|
# their Ruby version
|
179
177
|
suggest_ruby_reinstall(e)
|
@@ -26,6 +26,8 @@ module Gym
|
|
26
26
|
end
|
27
27
|
end
|
28
28
|
|
29
|
+
ensure_export_options_is_hash
|
30
|
+
|
29
31
|
detect_scheme
|
30
32
|
detect_platform # we can only do that *after* we have the scheme
|
31
33
|
detect_selected_provisioning_profiles # we can only do that *after* we have the platform
|
@@ -144,5 +146,26 @@ module Gym
|
|
144
146
|
Gym.config[:toolchain] = "com.apple.dt.toolchain.Swift_2_3"
|
145
147
|
end
|
146
148
|
end
|
149
|
+
|
150
|
+
def self.ensure_export_options_is_hash
|
151
|
+
return if Gym.config[:export_options].nil? || Gym.config[:export_options].kind_of?(Hash)
|
152
|
+
|
153
|
+
# Reads options from file
|
154
|
+
plist_file_path = Gym.config[:export_options]
|
155
|
+
UI.user_error!("Couldn't find plist file at path #{File.expand_path(plist_file_path)}") unless File.exist?(plist_file_path)
|
156
|
+
hash = Plist.parse_xml(plist_file_path)
|
157
|
+
UI.user_error!("Couldn't read provided plist at path #{File.expand_path(plist_file_path)}") if hash.nil?
|
158
|
+
# Convert keys to symbols
|
159
|
+
Gym.config[:export_options] = keys_to_symbols(hash)
|
160
|
+
end
|
161
|
+
|
162
|
+
def self.keys_to_symbols(hash)
|
163
|
+
# Convert keys to symbols
|
164
|
+
hash = hash.each_with_object({}) do |(k, v), memo|
|
165
|
+
memo[k.b.to_s.to_sym] = v
|
166
|
+
memo
|
167
|
+
end
|
168
|
+
hash
|
169
|
+
end
|
147
170
|
end
|
148
171
|
end
|
@@ -124,30 +124,10 @@ module Gym
|
|
124
124
|
hash
|
125
125
|
end
|
126
126
|
|
127
|
-
def keys_to_symbols(hash)
|
128
|
-
# Convert keys to symbols
|
129
|
-
hash = hash.each_with_object({}) do |(k, v), memo|
|
130
|
-
memo[k.b.to_s.to_sym] = v
|
131
|
-
memo
|
132
|
-
end
|
133
|
-
hash
|
134
|
-
end
|
135
|
-
|
136
127
|
def read_export_options
|
137
128
|
# Reads export options
|
138
129
|
if Gym.config[:export_options]
|
139
|
-
|
140
|
-
# Reads options from hash
|
141
|
-
hash = normalize_export_options(Gym.config[:export_options])
|
142
|
-
else
|
143
|
-
# Reads options from file
|
144
|
-
plist_file_path = Gym.config[:export_options]
|
145
|
-
UI.user_error!("Couldn't find plist file at path #{File.expand_path(plist_file_path)}") unless File.exist?(plist_file_path)
|
146
|
-
hash = Plist.parse_xml(plist_file_path)
|
147
|
-
UI.user_error!("Couldn't read provided plist at path #{File.expand_path(plist_file_path)}") if hash.nil?
|
148
|
-
# Convert keys to symbols
|
149
|
-
hash = keys_to_symbols(hash)
|
150
|
-
end
|
130
|
+
hash = normalize_export_options(Gym.config[:export_options])
|
151
131
|
|
152
132
|
# Saves configuration for later use
|
153
133
|
Gym.config[:export_method] ||= hash[:method] || DEFAULT_EXPORT_METHOD
|
@@ -2,7 +2,7 @@ require 'spaceship'
|
|
2
2
|
require_relative 'module'
|
3
3
|
|
4
4
|
module Match
|
5
|
-
# Ensures the certificate and profiles are also available on
|
5
|
+
# Ensures the certificate and profiles are also available on App Store Connect
|
6
6
|
class SpaceshipEnsure
|
7
7
|
def initialize(user, team_id, team_name)
|
8
8
|
# We'll try to manually fetch the password
|
@@ -41,7 +41,7 @@ module Pilot
|
|
41
41
|
UI.user_error!("Error uploading ipa file, for more information see above")
|
42
42
|
end
|
43
43
|
|
44
|
-
UI.success("Successfully uploaded the new binary to
|
44
|
+
UI.success("Successfully uploaded the new binary to App Store Connect")
|
45
45
|
|
46
46
|
if config[:skip_waiting_for_build_processing]
|
47
47
|
UI.important("Skip waiting for build processing")
|
@@ -182,7 +182,7 @@ module Pilot
|
|
182
182
|
begin
|
183
183
|
uploaded_build.submit_for_testflight_review!
|
184
184
|
rescue => ex
|
185
|
-
#
|
185
|
+
# App Store Connect currently may 504 on this request even though it manages to get the build in
|
186
186
|
# the approved state, this is a temporary workaround.
|
187
187
|
raise ex unless ex.to_s.include?("504")
|
188
188
|
UI.message("Submitting the build for review timed out, trying to recover.")
|
data/pilot/lib/pilot/manager.rb
CHANGED
@@ -19,7 +19,7 @@ module Pilot
|
|
19
19
|
def login
|
20
20
|
config[:username] ||= CredentialsManager::AppfileConfig.try_fetch_value(:apple_id)
|
21
21
|
|
22
|
-
UI.message("Login to
|
22
|
+
UI.message("Login to App Store Connect (#{config[:username]})")
|
23
23
|
Spaceship::Tunes.login(config[:username])
|
24
24
|
Spaceship::Tunes.select_team
|
25
25
|
UI.message("Login successful")
|
@@ -48,7 +48,7 @@ module Pilot
|
|
48
48
|
|
49
49
|
if config[:app_identifier]
|
50
50
|
@app ||= Spaceship::Tunes::Application.find(config[:app_identifier])
|
51
|
-
UI.user_error!("Couldn't find app '#{config[:app_identifier]}' on the account of '#{config[:username]}' on
|
51
|
+
UI.user_error!("Couldn't find app '#{config[:app_identifier]}' on the account of '#{config[:username]}' on App Store Connect") unless @app
|
52
52
|
app_id ||= @app.apple_id
|
53
53
|
end
|
54
54
|
|
data/pilot/lib/pilot/options.rb
CHANGED
@@ -83,7 +83,7 @@ module Pilot
|
|
83
83
|
FastlaneCore::ConfigItem.new(key: :apple_id,
|
84
84
|
short_option: "-p",
|
85
85
|
env_name: "PILOT_APPLE_ID",
|
86
|
-
description: "The unique App ID provided by
|
86
|
+
description: "The unique App ID provided by App Store Connect",
|
87
87
|
optional: true,
|
88
88
|
code_gen_sensitive: true,
|
89
89
|
default_value: ENV["TESTFLIGHT_APPLE_ID"],
|
@@ -130,7 +130,7 @@ module Pilot
|
|
130
130
|
FastlaneCore::ConfigItem.new(key: :wait_processing_interval,
|
131
131
|
short_option: "-k",
|
132
132
|
env_name: "PILOT_WAIT_PROCESSING_INTERVAL",
|
133
|
-
description: "Interval in seconds to wait for
|
133
|
+
description: "Interval in seconds to wait for App Store Connect processing",
|
134
134
|
default_value: 30,
|
135
135
|
type: Integer,
|
136
136
|
verify_block: proc do |value|
|
@@ -139,7 +139,7 @@ module Pilot
|
|
139
139
|
FastlaneCore::ConfigItem.new(key: :team_id,
|
140
140
|
short_option: "-q",
|
141
141
|
env_name: "PILOT_TEAM_ID",
|
142
|
-
description: "The ID of your
|
142
|
+
description: "The ID of your App Store Connect team if you're in multiple teams",
|
143
143
|
optional: true,
|
144
144
|
is_string: false, # as we also allow integers, which we convert to strings anyway
|
145
145
|
code_gen_sensitive: true,
|
@@ -151,7 +151,7 @@ module Pilot
|
|
151
151
|
FastlaneCore::ConfigItem.new(key: :team_name,
|
152
152
|
short_option: "-r",
|
153
153
|
env_name: "PILOT_TEAM_NAME",
|
154
|
-
description: "The name of your
|
154
|
+
description: "The name of your App Store Connect team if you're in multiple teams",
|
155
155
|
optional: true,
|
156
156
|
code_gen_sensitive: true,
|
157
157
|
default_value: CredentialsManager::AppfileConfig.try_fetch_value(:itc_team_name),
|
@@ -41,7 +41,7 @@ module Precheck
|
|
41
41
|
FastlaneCore::ConfigItem.new(key: :team_id,
|
42
42
|
short_option: "-b",
|
43
43
|
env_name: "PRECHECK_TEAM_ID",
|
44
|
-
description: "The ID of your
|
44
|
+
description: "The ID of your App Store Connect team if you're in multiple teams",
|
45
45
|
optional: true,
|
46
46
|
code_gen_sensitive: true,
|
47
47
|
default_value: CredentialsManager::AppfileConfig.try_fetch_value(:itc_team_id),
|
@@ -52,7 +52,7 @@ module Precheck
|
|
52
52
|
FastlaneCore::ConfigItem.new(key: :team_name,
|
53
53
|
short_option: "-l",
|
54
54
|
env_name: "PRECHECK_TEAM_NAME",
|
55
|
-
description: "The name of your
|
55
|
+
description: "The name of your App Store Connect team if you're in multiple teams",
|
56
56
|
optional: true,
|
57
57
|
code_gen_sensitive: true,
|
58
58
|
default_value: CredentialsManager::AppfileConfig.try_fetch_value(:itc_team_name),
|
@@ -29,7 +29,7 @@ module Produce
|
|
29
29
|
|
30
30
|
command :create do |c|
|
31
31
|
c.syntax = 'fastlane produce create'
|
32
|
-
c.description = 'Creates a new app on
|
32
|
+
c.description = 'Creates a new app on App Store Connect and the Apple Developer Portal'
|
33
33
|
|
34
34
|
FastlaneCore::CommanderGenerator.new.generate(Produce::Options.available_options, command: c)
|
35
35
|
|
@@ -62,7 +62,7 @@ module Produce
|
|
62
62
|
if app.name != Produce.config[:app_name]
|
63
63
|
UI.important("Your app name includes non-ASCII characters, which are not supported by the Apple Developer Portal.")
|
64
64
|
UI.important("To fix this a unique (internal) name '#{app.name}' has been created for you. Your app's real name '#{Produce.config[:app_name]}'")
|
65
|
-
UI.important("will still show up correctly on
|
65
|
+
UI.important("will still show up correctly on App Store Connect and the App Store.")
|
66
66
|
end
|
67
67
|
|
68
68
|
UI.message("Created app #{app.app_id}")
|
@@ -18,10 +18,10 @@ module Produce
|
|
18
18
|
def create_new_app
|
19
19
|
application = fetch_application
|
20
20
|
if application
|
21
|
-
UI.success("[iTC] App '#{Produce.config[:app_identifier]}' already exists (#{application.apple_id}), nothing to do on
|
21
|
+
UI.success("[iTC] App '#{Produce.config[:app_identifier]}' already exists (#{application.apple_id}), nothing to do on App Store Connect")
|
22
22
|
# Nothing to do here
|
23
23
|
else
|
24
|
-
UI.success("Creating new app '#{Produce.config[:app_name]}' on
|
24
|
+
UI.success("Creating new app '#{Produce.config[:app_name]}' on App Store Connect")
|
25
25
|
|
26
26
|
Produce.config[:bundle_identifier_suffix] = '' unless wildcard_bundle?
|
27
27
|
generated_app = Spaceship::Tunes::Application.create!(name: Produce.config[:app_name],
|
@@ -39,11 +39,11 @@ module Produce
|
|
39
39
|
counter = 0
|
40
40
|
while application.nil?
|
41
41
|
counter += 1
|
42
|
-
UI.crash!("Couldn't find newly created app on
|
42
|
+
UI.crash!("Couldn't find newly created app on App Store Connect - please check the website for more information") if counter == 200
|
43
43
|
|
44
|
-
# Since 2016-08-10
|
44
|
+
# Since 2016-08-10 App Store Connect takes some time to actually list the newly created application
|
45
45
|
# We have no choice but to poll to see if the newly created app is already available
|
46
|
-
UI.message("Waiting for the newly created application to be available on
|
46
|
+
UI.message("Waiting for the newly created application to be available on App Store Connect...")
|
47
47
|
sleep(15)
|
48
48
|
application = fetch_application
|
49
49
|
end
|
@@ -53,7 +53,7 @@ module Produce
|
|
53
53
|
UI.message("Ensuring version number")
|
54
54
|
application.ensure_version!(Produce.config[:app_version], platform: Produce.config[:platform]) if Produce.config[:app_version]
|
55
55
|
|
56
|
-
UI.success("Successfully created new app '#{Produce.config[:app_name]}' on
|
56
|
+
UI.success("Successfully created new app '#{Produce.config[:app_name]}' on App Store Connect with ID #{application.apple_id}")
|
57
57
|
end
|
58
58
|
|
59
59
|
return Spaceship::Tunes::Application.find(@full_bundle_identifier, mac: Produce.config[:platform] == "osx").apple_id
|
@@ -70,7 +70,7 @@ module Produce
|
|
70
70
|
FastlaneCore::ConfigItem.new(key: :skip_itc,
|
71
71
|
short_option: "-i",
|
72
72
|
env_name: "PRODUCE_SKIP_ITC",
|
73
|
-
description: "Skip the creation of the app on
|
73
|
+
description: "Skip the creation of the app on App Store Connect",
|
74
74
|
is_string: false,
|
75
75
|
default_value: false),
|
76
76
|
FastlaneCore::ConfigItem.new(key: :itc_users,
|
@@ -78,7 +78,7 @@ module Produce
|
|
78
78
|
env_name: "ITC_USERS",
|
79
79
|
optional: true,
|
80
80
|
type: Array,
|
81
|
-
description: "Array of
|
81
|
+
description: "Array of App Store Connect users. If provided, you can limit access to this newly created app for users with the App Manager, Developer, Marketer or Sales roles",
|
82
82
|
is_string: false),
|
83
83
|
# Deprecating this in favor of a rename from "enabled_features" to "enable_services"
|
84
84
|
FastlaneCore::ConfigItem.new(key: :enabled_features,
|
@@ -140,7 +140,7 @@ module Produce
|
|
140
140
|
FastlaneCore::ConfigItem.new(key: :itc_team_id,
|
141
141
|
short_option: "-k",
|
142
142
|
env_name: "PRODUCE_ITC_TEAM_ID",
|
143
|
-
description: "The ID of your
|
143
|
+
description: "The ID of your App Store Connect team if you're in multiple teams",
|
144
144
|
optional: true,
|
145
145
|
is_string: false, # as we also allow integers, which we convert to strings anyway
|
146
146
|
code_gen_sensitive: true,
|
@@ -152,7 +152,7 @@ module Produce
|
|
152
152
|
FastlaneCore::ConfigItem.new(key: :itc_team_name,
|
153
153
|
short_option: "-p",
|
154
154
|
env_name: "PRODUCE_ITC_TEAM_NAME",
|
155
|
-
description: "The name of your
|
155
|
+
description: "The name of your App Store Connect team if you're in multiple teams",
|
156
156
|
optional: true,
|
157
157
|
code_gen_sensitive: true,
|
158
158
|
default_value: CredentialsManager::AppfileConfig.try_fetch_value(:itc_team_name),
|
@@ -84,8 +84,12 @@ module Scan
|
|
84
84
|
end
|
85
85
|
|
86
86
|
formatter = []
|
87
|
-
if Scan.config[:formatter]
|
88
|
-
|
87
|
+
if (custom_formatter = Scan.config[:formatter])
|
88
|
+
if custom_formatter.end_with?(".rb")
|
89
|
+
formatter << "-f '#{custom_formatter}'"
|
90
|
+
else
|
91
|
+
formatter << "-f `#{custom_formatter}`"
|
92
|
+
end
|
89
93
|
elsif FastlaneCore::Env.truthy?("TRAVIS")
|
90
94
|
formatter << "-f `xcpretty-travis-formatter`"
|
91
95
|
UI.success("Automatically switched to Travis formatter")
|
@@ -178,13 +178,13 @@ module Screengrab
|
|
178
178
|
|
179
179
|
def install_apks(device_serial, app_apk_path, tests_apk_path)
|
180
180
|
UI.message('Installing app APK')
|
181
|
-
apk_install_output = run_adb_command("adb -s #{device_serial} install -r #{app_apk_path.shellescape}",
|
181
|
+
apk_install_output = run_adb_command("adb -s #{device_serial} install -t -r #{app_apk_path.shellescape}",
|
182
182
|
print_all: true,
|
183
183
|
print_command: true)
|
184
184
|
UI.user_error!("App APK could not be installed") if apk_install_output.include?("Failure [")
|
185
185
|
|
186
186
|
UI.message('Installing tests APK')
|
187
|
-
apk_install_output = run_adb_command("adb -s #{device_serial} install -r #{tests_apk_path.shellescape}",
|
187
|
+
apk_install_output = run_adb_command("adb -s #{device_serial} install -t -r #{tests_apk_path.shellescape}",
|
188
188
|
print_all: true,
|
189
189
|
print_command: true)
|
190
190
|
UI.user_error!("Tests APK could not be installed") if apk_install_output.include?("Failure [")
|
data/sigh/lib/sigh/runner.rb
CHANGED
@@ -176,6 +176,11 @@ module Sigh
|
|
176
176
|
certificates = Spaceship.certificate.development.all
|
177
177
|
elsif profile_type == Spaceship.provisioning_profile.InHouse
|
178
178
|
certificates = Spaceship.certificate.in_house.all
|
179
|
+
# handles case where the desired certificate type is adhoc but the account is an enterprise account
|
180
|
+
# the apple dev portal api has a weird quirk in it where if you query for distribution certificates
|
181
|
+
# for enterprise accounts, you get nothing back even if they exist.
|
182
|
+
elsif profile_type == Spaceship.provisioning_profile.AdHoc && Spaceship.client && Spaceship.client.in_house?
|
183
|
+
certificates = Spaceship.certificate.in_house.all
|
179
184
|
else
|
180
185
|
certificates = Spaceship.certificate.production.all # Ad hoc or App Store
|
181
186
|
end
|
@@ -283,7 +288,7 @@ module Sigh
|
|
283
288
|
UI.message("fastlane produce -u #{config[:username]} -a #{config[:app_identifier]} --skip_itc".yellow)
|
284
289
|
UI.message("")
|
285
290
|
UI.message("You will be asked for any missing information, like the full name of your app")
|
286
|
-
UI.message("If the app should also be created on
|
291
|
+
UI.message("If the app should also be created on App Store Connect, remove the " + "--skip_itc".yellow + " from the command above")
|
287
292
|
UI.message("==========================================".yellow)
|
288
293
|
UI.message("")
|
289
294
|
end
|
data/spaceship/README.md
CHANGED
@@ -33,7 +33,7 @@
|
|
33
33
|
[](https://twitter.com/FastlaneTools)
|
34
34
|
[](https://github.com/fastlane/fastlane/blob/master/LICENSE)
|
35
35
|
|
36
|
-
_spaceship_ exposes both the Apple Developer Center and the
|
36
|
+
_spaceship_ exposes both the Apple Developer Center and the App Store Connect API. This fast and powerful API powers parts of fastlane, and can be leveraged for more advanced fastlane features. Scripting your Developer Center workflow has never been easier!
|
37
37
|
|
38
38
|
Get in contact with the creators on Twitter: [@FastlaneTools](https://twitter.com/fastlanetools)
|
39
39
|
|
@@ -107,7 +107,7 @@ This requires you to install `pry` using `sudo gem install pry`. `pry` is not in
|
|
107
107
|
|
108
108
|
##### Open [DeveloperPortal.md](docs/DeveloperPortal.md) for code samples
|
109
109
|
|
110
|
-
##
|
110
|
+
## App Store Connect API
|
111
111
|
|
112
112
|
##### Open [iTunesConnect.md](docs/iTunesConnect.md) for code samples
|
113
113
|
|
@@ -135,7 +135,7 @@ Copy everything from `---\n` to your CI server and provide it as environment var
|
|
135
135
|
|
136
136
|
#### Transporter
|
137
137
|
|
138
|
-
If you want to upload builds to TestFlight/
|
138
|
+
If you want to upload builds to TestFlight/App Store Connect from your CI, you have to generate an application specific password:
|
139
139
|
|
140
140
|
1. Visit [appleid.apple.com/account/manage](https://appleid.apple.com/account/manage)
|
141
141
|
1. Generate a new application specific password
|
data/spaceship/lib/spaceship.rb
CHANGED
@@ -8,7 +8,7 @@ require_relative 'spaceship/launcher'
|
|
8
8
|
require_relative 'spaceship/portal/portal'
|
9
9
|
require_relative 'spaceship/portal/spaceship'
|
10
10
|
|
11
|
-
#
|
11
|
+
# App Store Connect
|
12
12
|
require_relative 'spaceship/tunes/tunes'
|
13
13
|
require_relative 'spaceship/tunes/spaceship'
|
14
14
|
require_relative 'spaceship/test_flight'
|
@@ -371,7 +371,7 @@ module Spaceship
|
|
371
371
|
end
|
372
372
|
end
|
373
373
|
|
374
|
-
# This method is used for both the Apple Dev Portal and
|
374
|
+
# This method is used for both the Apple Dev Portal and App Store Connect
|
375
375
|
# This will also handle 2 step verification
|
376
376
|
def send_shared_login_request(user, password)
|
377
377
|
# Check if we have a cached/valid session here
|
@@ -394,7 +394,7 @@ module Spaceship
|
|
394
394
|
# As this will raise an exception if the old session has expired
|
395
395
|
# If the old session is still valid, we don't have to do anything else in this method
|
396
396
|
# that's why we return true
|
397
|
-
return true if fetch_olympus_session
|
397
|
+
return true if fetch_olympus_session
|
398
398
|
rescue
|
399
399
|
# If the `fetch_olympus_session` method raises an exception
|
400
400
|
# we'll land here, and therefore continue doing a full login process
|
@@ -471,7 +471,7 @@ module Spaceship
|
|
471
471
|
# Looking for status of 412 might be enough but might be safer to keep looking only at what is being reported
|
472
472
|
raise AppleIDAndPrivacyAcknowledgementNeeded.new, "Need to acknowledge to Apple's Apple ID and Privacy statement. Please manually log into https://appleid.apple.com (or https://itunesconnect.apple.com) to acknowledge the statement."
|
473
473
|
elsif (response['Set-Cookie'] || "").include?("itctx")
|
474
|
-
raise "Looks like your Apple ID is not enabled for
|
474
|
+
raise "Looks like your Apple ID is not enabled for App Store Connect, make sure to be able to login online"
|
475
475
|
else
|
476
476
|
info = [response.body, response['Set-Cookie']]
|
477
477
|
raise Tunes::Error.new, info.join("\n")
|
@@ -491,8 +491,13 @@ module Spaceship
|
|
491
491
|
end
|
492
492
|
|
493
493
|
provider = body["provider"]
|
494
|
-
|
494
|
+
if provider
|
495
|
+
self.provider = Spaceship::Provider.new(provider_hash: provider)
|
496
|
+
return true
|
497
|
+
end
|
495
498
|
end
|
499
|
+
|
500
|
+
return false
|
496
501
|
end
|
497
502
|
|
498
503
|
def itc_service_key
|
@@ -513,7 +518,7 @@ module Spaceship
|
|
513
518
|
return @service_key
|
514
519
|
rescue => ex
|
515
520
|
puts(ex.to_s)
|
516
|
-
raise AppleTimeoutError.new, "Could not receive latest API key from
|
521
|
+
raise AppleTimeoutError.new, "Could not receive latest API key from App Store Connect, this might be a server issue."
|
517
522
|
end
|
518
523
|
|
519
524
|
#####################################################
|
@@ -614,7 +619,7 @@ module Spaceship
|
|
614
619
|
end
|
615
620
|
|
616
621
|
def detect_most_common_errors_and_raise_exceptions(body)
|
617
|
-
# Check if the failure is due to missing permissions (
|
622
|
+
# Check if the failure is due to missing permissions (App Store Connect)
|
618
623
|
if body["messages"] && body["messages"]["error"].include?("Forbidden")
|
619
624
|
raise_insuffient_permission_error!
|
620
625
|
elsif body["messages"] && body["messages"]["error"].include?("insufficient privileges")
|
@@ -622,7 +627,7 @@ module Spaceship
|
|
622
627
|
# With the default location the error would say that `parse_response` is the caller
|
623
628
|
raise_insuffient_permission_error!(caller_location: 3)
|
624
629
|
elsif body.to_s.include?("Internal Server Error - Read")
|
625
|
-
raise InternalServerError, "Received an internal server error from
|
630
|
+
raise InternalServerError, "Received an internal server error from App Store Connect / Developer Portal, please try again later"
|
626
631
|
elsif (body["resultString"] || "").include?("Program License Agreement")
|
627
632
|
raise ProgramLicenseAgreementUpdated, "#{body['userString']} Please manually log into your Apple Developer account to review and accept the updated agreement."
|
628
633
|
end
|