fastlane 2.216.0 → 2.218.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +96 -96
- data/deliver/lib/deliver/app_screenshot.rb +9 -2
- data/deliver/lib/deliver/app_screenshot_iterator.rb +2 -2
- data/deliver/lib/deliver/detect_values.rb +1 -1
- data/deliver/lib/deliver/languages.rb +1 -1
- data/deliver/lib/deliver/loader.rb +2 -2
- data/deliver/lib/deliver/options.rb +4 -4
- data/deliver/lib/deliver/runner.rb +3 -2
- data/deliver/lib/deliver/sync_screenshots.rb +2 -2
- data/deliver/lib/deliver/upload_metadata.rb +60 -15
- data/deliver/lib/deliver/upload_price_tier.rb +1 -1
- data/deliver/lib/deliver/upload_screenshots.rb +3 -3
- data/fastlane/lib/fastlane/action.rb +1 -1
- data/fastlane/lib/fastlane/actions/appledoc.rb +1 -1
- data/fastlane/lib/fastlane/actions/apteligent.rb +1 -1
- data/fastlane/lib/fastlane/actions/backup_xcarchive.rb +1 -1
- data/fastlane/lib/fastlane/actions/commit_github_file.rb +2 -2
- data/fastlane/lib/fastlane/actions/copy_artifacts.rb +1 -1
- data/fastlane/lib/fastlane/actions/create_app_online.rb +1 -1
- data/fastlane/lib/fastlane/actions/create_pull_request.rb +1 -1
- data/fastlane/lib/fastlane/actions/docs/upload_to_app_store.md.erb +1 -1
- data/fastlane/lib/fastlane/actions/docs/upload_to_play_store.md +6 -2
- data/fastlane/lib/fastlane/actions/get_certificates.rb +1 -1
- data/fastlane/lib/fastlane/actions/get_github_release.rb +1 -1
- data/fastlane/lib/fastlane/actions/get_provisioning_profile.rb +1 -1
- data/fastlane/lib/fastlane/actions/git_branch.rb +1 -1
- data/fastlane/lib/fastlane/actions/github_api.rb +1 -1
- data/fastlane/lib/fastlane/actions/gradle.rb +1 -1
- data/fastlane/lib/fastlane/actions/install_on_device.rb +2 -2
- data/fastlane/lib/fastlane/actions/ipa.rb +1 -1
- data/fastlane/lib/fastlane/actions/jazzy.rb +1 -1
- data/fastlane/lib/fastlane/actions/nexus_upload.rb +1 -0
- data/fastlane/lib/fastlane/actions/notarize.rb +17 -2
- data/fastlane/lib/fastlane/actions/oclint.rb +3 -3
- data/fastlane/lib/fastlane/actions/opt_out_crash_reporting.rb +2 -2
- data/fastlane/lib/fastlane/actions/restore_file.rb +1 -1
- data/fastlane/lib/fastlane/actions/set_github_release.rb +1 -1
- data/fastlane/lib/fastlane/actions/slather.rb +18 -5
- data/fastlane/lib/fastlane/actions/sonar.rb +12 -3
- data/fastlane/lib/fastlane/actions/splunkmint.rb +1 -1
- data/fastlane/lib/fastlane/actions/spm.rb +76 -2
- data/fastlane/lib/fastlane/actions/update_info_plist.rb +1 -1
- data/fastlane/lib/fastlane/actions/update_urban_airship_configuration.rb +1 -1
- data/fastlane/lib/fastlane/actions/upload_symbols_to_crashlytics.rb +1 -0
- data/fastlane/lib/fastlane/actions/upload_symbols_to_sentry.rb +1 -1
- data/fastlane/lib/fastlane/actions/upload_to_testflight.rb +2 -2
- data/fastlane/lib/fastlane/actions/verify_build.rb +7 -4
- data/fastlane/lib/fastlane/actions/xcov.rb +1 -1
- data/fastlane/lib/fastlane/cli_tools_distributor.rb +1 -1
- data/fastlane/lib/fastlane/command_line_handler.rb +2 -4
- data/fastlane/lib/fastlane/commands_generator.rb +2 -2
- data/fastlane/lib/fastlane/fast_file.rb +1 -1
- data/fastlane/lib/fastlane/helper/dotenv_helper.rb +1 -1
- data/fastlane/lib/fastlane/helper/git_helper.rb +3 -0
- data/fastlane/lib/fastlane/junit_generator.rb +1 -1
- data/fastlane/lib/fastlane/lane.rb +9 -1
- data/fastlane/lib/fastlane/lane_manager.rb +1 -2
- data/fastlane/lib/fastlane/plugins/template/%gem_name%.gemspec.erb +0 -11
- data/fastlane/lib/fastlane/plugins/template/.rubocop.yml +5 -1
- data/fastlane/lib/fastlane/plugins/template/Gemfile.erb +27 -0
- data/fastlane/lib/fastlane/runner.rb +2 -2
- data/fastlane/lib/fastlane/setup/setup.rb +1 -1
- data/fastlane/lib/fastlane/swift_lane_manager.rb +2 -5
- data/fastlane/lib/fastlane/swift_runner_upgrader.rb +7 -4
- data/fastlane/lib/fastlane/version.rb +1 -1
- data/fastlane/swift/Actions.swift +1 -1
- data/fastlane/swift/Appfile.swift +1 -1
- data/fastlane/swift/ArgumentProcessor.swift +1 -1
- data/fastlane/swift/Atomic.swift +1 -1
- data/fastlane/swift/ControlCommand.swift +1 -1
- data/fastlane/swift/Deliverfile.swift +2 -2
- data/fastlane/swift/DeliverfileProtocol.swift +4 -4
- data/fastlane/swift/Fastlane.swift +99 -31
- data/fastlane/swift/Gymfile.swift +2 -2
- data/fastlane/swift/GymfileProtocol.swift +2 -2
- data/fastlane/swift/LaneFileProtocol.swift +5 -5
- data/fastlane/swift/MainProcess.swift +1 -1
- data/fastlane/swift/Matchfile.swift +2 -2
- data/fastlane/swift/MatchfileProtocol.swift +6 -2
- data/fastlane/swift/OptionalConfigValue.swift +1 -1
- data/fastlane/swift/Plugins.swift +1 -1
- data/fastlane/swift/Precheckfile.swift +2 -2
- data/fastlane/swift/PrecheckfileProtocol.swift +2 -2
- data/fastlane/swift/RubyCommand.swift +1 -1
- data/fastlane/swift/RubyCommandable.swift +1 -1
- data/fastlane/swift/Runner.swift +1 -1
- data/fastlane/swift/RunnerArgument.swift +1 -1
- data/fastlane/swift/Scanfile.swift +2 -2
- data/fastlane/swift/ScanfileProtocol.swift +2 -2
- data/fastlane/swift/Screengrabfile.swift +2 -2
- data/fastlane/swift/ScreengrabfileProtocol.swift +2 -2
- data/fastlane/swift/Snapshotfile.swift +2 -2
- data/fastlane/swift/SnapshotfileProtocol.swift +2 -2
- data/fastlane/swift/SocketClient.swift +1 -1
- data/fastlane/swift/SocketClientDelegateProtocol.swift +1 -1
- data/fastlane/swift/SocketResponse.swift +1 -1
- data/fastlane/swift/formatting/Brewfile.lock.json +19 -29
- data/fastlane/swift/main.swift +1 -1
- data/fastlane_core/lib/fastlane_core/build_watcher.rb +1 -1
- data/fastlane_core/lib/fastlane_core/cert_checker.rb +3 -3
- data/fastlane_core/lib/fastlane_core/configuration/configuration_file.rb +1 -1
- data/fastlane_core/lib/fastlane_core/device_manager.rb +17 -15
- data/fastlane_core/lib/fastlane_core/fastlane_pty.rb +34 -12
- data/fastlane_core/lib/fastlane_core/helper.rb +1 -1
- data/fastlane_core/lib/fastlane_core/itunes_transporter.rb +5 -2
- data/fastlane_core/lib/fastlane_core/project.rb +7 -2
- data/fastlane_core/lib/fastlane_core/queue_worker.rb +2 -2
- data/fastlane_core/lib/fastlane_core/string_filters.rb +6 -6
- data/fastlane_core/lib/fastlane_core/ui/fastlane_runner.rb +2 -2
- data/frameit/lib/frameit/editor.rb +4 -4
- data/frameit/lib/frameit/trim_box.rb +1 -1
- data/gym/lib/gym/error_handler.rb +1 -1
- data/gym/lib/gym/generators/package_command_generator_xcode7.rb +3 -3
- data/gym/lib/gym/module.rb +13 -2
- data/gym/lib/gym/options.rb +1 -1
- data/gym/lib/gym/runner.rb +1 -1
- data/gym/lib/gym/xcodebuild_fixes/README.md +1 -1
- data/match/lib/match/generator.rb +9 -1
- data/match/lib/match/module.rb +2 -1
- data/match/lib/match/options.rb +5 -0
- data/match/lib/match/portal_cache.rb +106 -0
- data/match/lib/match/portal_fetcher.rb +72 -0
- data/match/lib/match/profile_includes.rb +120 -0
- data/match/lib/match/runner.rb +79 -172
- data/match/lib/match/spaceship_ensure.rb +15 -11
- data/match/lib/match/storage/git_storage.rb +17 -4
- data/match/lib/match/storage/gitlab/client.rb +1 -1
- data/match/lib/match/storage/gitlab_secure_files.rb +1 -1
- data/match/lib/match/storage/interface.rb +1 -1
- data/match/lib/match/storage/s3_storage.rb +1 -1
- data/match/lib/match.rb +3 -0
- data/precheck/lib/precheck/rules/unreachable_urls_rule.rb +1 -1
- data/produce/lib/produce/itunes_connect.rb +1 -1
- data/scan/lib/scan/detect_values.rb +78 -20
- data/scan/lib/scan/options.rb +1 -1
- data/scan/lib/scan/runner.rb +1 -1
- data/screengrab/lib/screengrab/runner.rb +1 -1
- data/sigh/lib/assets/resign.sh +10 -10
- data/sigh/lib/sigh/commands_generator.rb +1 -1
- data/sigh/lib/sigh/module.rb +98 -0
- data/sigh/lib/sigh/options.rb +55 -1
- data/sigh/lib/sigh/resign.rb +1 -1
- data/sigh/lib/sigh/runner.rb +35 -111
- data/snapshot/lib/assets/SnapshotHelper.swift +13 -9
- data/snapshot/lib/snapshot/reports_generator.rb +48 -7
- data/snapshot/lib/snapshot/setup.rb +2 -2
- data/snapshot/lib/snapshot/simulator_launchers/simulator_launcher.rb +23 -22
- data/snapshot/lib/snapshot/simulator_launchers/simulator_launcher_base.rb +2 -2
- data/spaceship/lib/spaceship/client.rb +1 -1
- data/spaceship/lib/spaceship/connect_api/api_client.rb +3 -2
- data/spaceship/lib/spaceship/connect_api/client.rb +4 -4
- data/spaceship/lib/spaceship/connect_api/models/app_preview_set.rb +2 -0
- data/spaceship/lib/spaceship/connect_api/models/app_screenshot.rb +2 -2
- data/spaceship/lib/spaceship/connect_api/models/app_screenshot_set.rb +2 -0
- data/spaceship/lib/spaceship/connect_api/models/bundle_id.rb +5 -5
- data/spaceship/lib/spaceship/connect_api/models/certificate.rb +3 -3
- data/spaceship/lib/spaceship/connect_api/models/device.rb +83 -4
- data/spaceship/lib/spaceship/connect_api/models/profile.rb +5 -3
- data/spaceship/lib/spaceship/connect_api/provisioning/provisioning.rb +14 -8
- data/spaceship/lib/spaceship/connect_api/tunes/tunes.rb +3 -6
- data/spaceship/lib/spaceship/connect_api.rb +2 -0
- data/spaceship/lib/spaceship/portal/app.rb +1 -1
- data/spaceship/lib/spaceship/portal/app_group.rb +1 -1
- data/spaceship/lib/spaceship/test_flight/client.rb +1 -1
- data/spaceship/lib/spaceship/test_flight/tester.rb +1 -1
- data/spaceship/lib/spaceship/tunes/app_details.rb +2 -2
- data/spaceship/lib/spaceship/tunes/app_image.rb +1 -1
- data/spaceship/lib/spaceship/tunes/app_review_attachment.rb +1 -1
- data/spaceship/lib/spaceship/tunes/app_submission.rb +1 -1
- data/spaceship/lib/spaceship/tunes/app_version.rb +5 -5
- data/spaceship/lib/spaceship/tunes/build_details.rb +1 -1
- data/spaceship/lib/spaceship/tunes/iap.rb +3 -3
- data/spaceship/lib/spaceship/tunes/iap_detail.rb +2 -2
- data/spaceship/lib/spaceship/tunes/iap_families.rb +1 -1
- data/spaceship/lib/spaceship/tunes/iap_family_details.rb +2 -2
- data/spaceship/lib/spaceship/tunes/iap_family_list.rb +1 -1
- data/spaceship/lib/spaceship/tunes/tunes_client.rb +2 -2
- data/supply/lib/supply/client.rb +1 -1
- data/supply/lib/supply/setup.rb +1 -1
- data/supply/lib/supply/uploader.rb +28 -13
- data/trainer/lib/trainer/junit_generator.rb +1 -1
- data/trainer/lib/trainer/test_parser.rb +1 -1
- data/trainer/lib/trainer/xcresult.rb +1 -1
- metadata +27 -293
- data/fastlane/lib/fastlane/.features.rb.swp +0 -0
- data/fastlane/lib/fastlane/plugins/template/Gemfile +0 -6
- data/fastlane_core/lib/fastlane_core/.env.rb.swp +0 -0
- data/supply/lib/supply/.client.rb.swp +0 -0
data/sigh/lib/sigh/runner.rb
CHANGED
@@ -14,7 +14,7 @@ module Sigh
|
|
14
14
|
# returns the path the newly created provisioning profile (in /tmp usually)
|
15
15
|
def run
|
16
16
|
FastlaneCore::PrintTable.print_values(config: Sigh.config,
|
17
|
-
hide_keys: [:output_path],
|
17
|
+
hide_keys: [:output_path, :cached_certificates, :cached_devices, :cached_bundle_ids, :cached_profiles],
|
18
18
|
title: "Summary for sigh #{Fastlane::VERSION}")
|
19
19
|
|
20
20
|
if (api_token = Spaceship::ConnectAPI::Token.from(hash: Sigh.config[:api_key], filepath: Sigh.config[:api_key_path]))
|
@@ -48,7 +48,7 @@ module Sigh
|
|
48
48
|
profile = create_profile!
|
49
49
|
end
|
50
50
|
else
|
51
|
-
UI.user_error!("No matching provisioning profile found and
|
51
|
+
UI.user_error!("No matching provisioning profile found and cannot create a new one because you enabled `readonly`") if Sigh.config[:readonly]
|
52
52
|
UI.important("No existing profiles found, that match the certificates you have installed locally! Creating a new provisioning profile for you")
|
53
53
|
ensure_app_exists!
|
54
54
|
profile = create_profile!
|
@@ -69,28 +69,7 @@ module Sigh
|
|
69
69
|
def profile_type
|
70
70
|
return @profile_type if @profile_type
|
71
71
|
|
72
|
-
|
73
|
-
when "ios"
|
74
|
-
@profile_type = Spaceship::ConnectAPI::Profile::ProfileType::IOS_APP_STORE
|
75
|
-
@profile_type = Spaceship::ConnectAPI::Profile::ProfileType::IOS_APP_INHOUSE if Spaceship::ConnectAPI.client.in_house?
|
76
|
-
@profile_type = Spaceship::ConnectAPI::Profile::ProfileType::IOS_APP_ADHOC if Sigh.config[:adhoc]
|
77
|
-
@profile_type = Spaceship::ConnectAPI::Profile::ProfileType::IOS_APP_DEVELOPMENT if Sigh.config[:development]
|
78
|
-
when "tvos"
|
79
|
-
@profile_type = Spaceship::ConnectAPI::Profile::ProfileType::TVOS_APP_STORE
|
80
|
-
@profile_type = Spaceship::ConnectAPI::Profile::ProfileType::TVOS_APP_INHOUSE if Spaceship::ConnectAPI.client.in_house?
|
81
|
-
@profile_type = Spaceship::ConnectAPI::Profile::ProfileType::TVOS_APP_ADHOC if Sigh.config[:adhoc]
|
82
|
-
@profile_type = Spaceship::ConnectAPI::Profile::ProfileType::TVOS_APP_DEVELOPMENT if Sigh.config[:development]
|
83
|
-
when "macos"
|
84
|
-
@profile_type = Spaceship::ConnectAPI::Profile::ProfileType::MAC_APP_STORE
|
85
|
-
@profile_type = Spaceship::ConnectAPI::Profile::ProfileType::MAC_APP_INHOUSE if Spaceship::ConnectAPI.client.in_house?
|
86
|
-
@profile_type = Spaceship::ConnectAPI::Profile::ProfileType::MAC_APP_DEVELOPMENT if Sigh.config[:development]
|
87
|
-
@profile_type = Spaceship::ConnectAPI::Profile::ProfileType::MAC_APP_DIRECT if Sigh.config[:developer_id]
|
88
|
-
when "catalyst"
|
89
|
-
@profile_type = Spaceship::ConnectAPI::Profile::ProfileType::MAC_CATALYST_APP_STORE
|
90
|
-
@profile_type = Spaceship::ConnectAPI::Profile::ProfileType::MAC_CATALYST_APP_INHOUSE if Spaceship::ConnectAPI.client.in_house?
|
91
|
-
@profile_type = Spaceship::ConnectAPI::Profile::ProfileType::MAC_CATALYST_APP_DEVELOPMENT if Sigh.config[:development]
|
92
|
-
@profile_type = Spaceship::ConnectAPI::Profile::ProfileType::MAC_CATALYST_APP_DIRECT if Sigh.config[:developer_id]
|
93
|
-
end
|
72
|
+
@profile_type = Sigh.profile_type_for_config(platform: Sigh.config[:platform], in_house: Spaceship::ConnectAPI.client.in_house?, config: Sigh.config)
|
94
73
|
|
95
74
|
@profile_type
|
96
75
|
end
|
@@ -99,9 +78,19 @@ module Sigh
|
|
99
78
|
def fetch_profiles
|
100
79
|
UI.message("Fetching profiles...")
|
101
80
|
|
102
|
-
|
103
|
-
#
|
104
|
-
|
81
|
+
filter = { profileType: profile_type }
|
82
|
+
# We can greatly speed up the search by filtering on the provisioning profile name
|
83
|
+
filter[:name] = Sigh.config[:provisioning_name] if Sigh.config[:provisioning_name].to_s.length > 0
|
84
|
+
|
85
|
+
includes = 'bundleId'
|
86
|
+
|
87
|
+
unless Sigh.config[:skip_certificate_verification] || Sigh.config[:include_all_certificates]
|
88
|
+
includes += ',certificates'
|
89
|
+
end
|
90
|
+
|
91
|
+
results = Sigh.config[:cached_profiles]
|
92
|
+
results ||= Spaceship::ConnectAPI::Profile.all(filter: filter, includes: includes)
|
93
|
+
results.select! do |profile|
|
105
94
|
profile.bundle_id.identifier == Sigh.config[:app_identifier]
|
106
95
|
end
|
107
96
|
|
@@ -166,7 +155,9 @@ module Sigh
|
|
166
155
|
name = Sigh.config[:provisioning_name] || [app_identifier, profile_type_pretty_type].join(' ')
|
167
156
|
|
168
157
|
unless Sigh.config[:skip_fetch_profiles]
|
169
|
-
|
158
|
+
# We can greatly speed up the search by filtering on the provisioning profile name
|
159
|
+
# It seems that there's no way to search for exact match using the API, so we'll need to run additional checks afterwards
|
160
|
+
profile = Spaceship::ConnectAPI::Profile.all(filter: { name: name }).find { |p| p.name == name }
|
170
161
|
if profile
|
171
162
|
UI.user_error!("The name '#{name}' is already taken, and fail_on_name_taken is true") if Sigh.config[:fail_on_name_taken]
|
172
163
|
UI.error("The name '#{name}' is already taken, using another one.")
|
@@ -174,7 +165,9 @@ module Sigh
|
|
174
165
|
end
|
175
166
|
end
|
176
167
|
|
177
|
-
|
168
|
+
bundle_ids = Sigh.config[:cached_bundle_ids]
|
169
|
+
bundle_id = bundle_ids.detect { |e| e.identifier == app_identifier } if bundle_ids
|
170
|
+
bundle_id ||= Spaceship::ConnectAPI::BundleId.find(app_identifier)
|
178
171
|
unless bundle_id
|
179
172
|
UI.user_error!("Could not find App with App Identifier '#{Sigh.config[:app_identifier]}'")
|
180
173
|
end
|
@@ -207,67 +200,15 @@ module Sigh
|
|
207
200
|
filter = {
|
208
201
|
certificateType: certificate_types.join(',')
|
209
202
|
}
|
210
|
-
|
203
|
+
|
204
|
+
certificates = Sigh.config[:cached_certificates]
|
205
|
+
certificates ||= Spaceship::ConnectAPI::Certificate.all(filter: filter)
|
206
|
+
|
207
|
+
return certificates
|
211
208
|
end
|
212
209
|
|
213
210
|
def certificates_for_profile_and_platform
|
214
|
-
types = []
|
215
|
-
|
216
|
-
case Sigh.config[:platform].to_s
|
217
|
-
when 'ios', 'tvos'
|
218
|
-
if profile_type == Spaceship::ConnectAPI::Profile::ProfileType::IOS_APP_DEVELOPMENT || profile_type == Spaceship::ConnectAPI::Profile::ProfileType::TVOS_APP_DEVELOPMENT
|
219
|
-
types = [
|
220
|
-
Spaceship::ConnectAPI::Certificate::CertificateType::DEVELOPMENT,
|
221
|
-
Spaceship::ConnectAPI::Certificate::CertificateType::IOS_DEVELOPMENT
|
222
|
-
]
|
223
|
-
elsif profile_type == Spaceship::ConnectAPI::Profile::ProfileType::IOS_APP_INHOUSE || profile_type == Spaceship::ConnectAPI::Profile::ProfileType::TVOS_APP_INHOUSE
|
224
|
-
# Enterprise accounts don't have access to Apple Distribution certificates
|
225
|
-
types = [
|
226
|
-
Spaceship::ConnectAPI::Certificate::CertificateType::IOS_DISTRIBUTION
|
227
|
-
]
|
228
|
-
# handles case where the desired certificate type is adhoc but the account is an enterprise account
|
229
|
-
# the apple dev portal api has a weird quirk in it where if you query for distribution certificates
|
230
|
-
# for enterprise accounts, you get nothing back even if they exist.
|
231
|
-
elsif (profile_type == Spaceship::ConnectAPI::Profile::ProfileType::IOS_APP_ADHOC || profile_type == Spaceship::ConnectAPI::Profile::ProfileType::TVOS_APP_ADHOC) && Spaceship::ConnectAPI.client && Spaceship::ConnectAPI.client.in_house?
|
232
|
-
# Enterprise accounts don't have access to Apple Distribution certificates
|
233
|
-
types = [
|
234
|
-
Spaceship::ConnectAPI::Certificate::CertificateType::IOS_DISTRIBUTION
|
235
|
-
]
|
236
|
-
else
|
237
|
-
types = [
|
238
|
-
Spaceship::ConnectAPI::Certificate::CertificateType::DISTRIBUTION,
|
239
|
-
Spaceship::ConnectAPI::Certificate::CertificateType::IOS_DISTRIBUTION
|
240
|
-
]
|
241
|
-
end
|
242
|
-
|
243
|
-
when 'macos', 'catalyst'
|
244
|
-
if profile_type == Spaceship::ConnectAPI::Profile::ProfileType::MAC_APP_DEVELOPMENT || profile_type == Spaceship::ConnectAPI::Profile::ProfileType::MAC_CATALYST_APP_DEVELOPMENT
|
245
|
-
types = [
|
246
|
-
Spaceship::ConnectAPI::Certificate::CertificateType::DEVELOPMENT,
|
247
|
-
Spaceship::ConnectAPI::Certificate::CertificateType::MAC_APP_DEVELOPMENT
|
248
|
-
]
|
249
|
-
elsif profile_type == Spaceship::ConnectAPI::Profile::ProfileType::MAC_APP_STORE || profile_type == Spaceship::ConnectAPI::Profile::ProfileType::MAC_CATALYST_APP_STORE
|
250
|
-
types = [
|
251
|
-
Spaceship::ConnectAPI::Certificate::CertificateType::DISTRIBUTION,
|
252
|
-
Spaceship::ConnectAPI::Certificate::CertificateType::MAC_APP_DISTRIBUTION
|
253
|
-
]
|
254
|
-
elsif profile_type == Spaceship::ConnectAPI::Profile::ProfileType::MAC_APP_DIRECT || profile_type == Spaceship::ConnectAPI::Profile::ProfileType::MAC_CATALYST_APP_DIRECT
|
255
|
-
types = [
|
256
|
-
Spaceship::ConnectAPI::Certificate::CertificateType::DEVELOPER_ID_APPLICATION,
|
257
|
-
Spaceship::ConnectAPI::Certificate::CertificateType::DEVELOPER_ID_APPLICATION_G2
|
258
|
-
]
|
259
|
-
elsif profile_type == Spaceship::ConnectAPI::Profile::ProfileType::MAC_APP_INHOUSE || profile_type == Spaceship::ConnectAPI::Profile::ProfileType::MAC_CATALYST_APP_INHOUSE
|
260
|
-
# Enterprise accounts don't have access to Apple Distribution certificates
|
261
|
-
types = [
|
262
|
-
Spaceship::ConnectAPI::Certificate::CertificateType::MAC_APP_DISTRIBUTION
|
263
|
-
]
|
264
|
-
else
|
265
|
-
types = [
|
266
|
-
Spaceship::ConnectAPI::Certificate::CertificateType::DISTRIBUTION,
|
267
|
-
Spaceship::ConnectAPI::Certificate::CertificateType::MAC_APP_DISTRIBUTION
|
268
|
-
]
|
269
|
-
end
|
270
|
-
end
|
211
|
+
types = Sigh.certificate_types_for_profile_and_platform(platform: Sigh.config[:platform], profile_type: profile_type)
|
271
212
|
|
272
213
|
fetch_certificates(types)
|
273
214
|
end
|
@@ -276,30 +217,13 @@ module Sigh
|
|
276
217
|
# Only use devices if development or adhoc
|
277
218
|
return [] if !Sigh.config[:development] && !Sigh.config[:adhoc]
|
278
219
|
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
]
|
287
|
-
when 'tvos'
|
288
|
-
[Spaceship::ConnectAPI::Device::DeviceClass::APPLE_TV]
|
289
|
-
when 'macos', 'catalyst'
|
290
|
-
[Spaceship::ConnectAPI::Device::DeviceClass::MAC]
|
291
|
-
end
|
292
|
-
if Sigh.config[:platform].to_s == 'ios' && Sigh.config[:include_mac_in_profiles]
|
293
|
-
device_classes += [Spaceship::ConnectAPI::Device::DeviceClass::APPLE_SILICON_MAC]
|
294
|
-
end
|
295
|
-
if Spaceship::ConnectAPI.token
|
296
|
-
return Spaceship::ConnectAPI::Device.all.select do |device|
|
297
|
-
device_classes.include?(device.device_class)
|
298
|
-
end
|
299
|
-
else
|
300
|
-
filter = { deviceClass: device_classes.join(",") }
|
301
|
-
return Spaceship::ConnectAPI::Device.all(filter: filter)
|
302
|
-
end
|
220
|
+
devices = Sigh.config[:cached_devices]
|
221
|
+
devices ||= Spaceship::ConnectAPI::Device.devices_for_platform(
|
222
|
+
platform: Sigh.config[:platform],
|
223
|
+
include_mac_in_profiles: Sigh.config[:include_mac_in_profiles]
|
224
|
+
)
|
225
|
+
|
226
|
+
return devices
|
303
227
|
end
|
304
228
|
|
305
229
|
# Certificate to use based on the current distribution mode
|
@@ -15,13 +15,12 @@
|
|
15
15
|
import Foundation
|
16
16
|
import XCTest
|
17
17
|
|
18
|
-
|
19
|
-
var locale = ""
|
20
|
-
|
18
|
+
@MainActor
|
21
19
|
func setupSnapshot(_ app: XCUIApplication, waitForAnimations: Bool = true) {
|
22
20
|
Snapshot.setupSnapshot(app, waitForAnimations: waitForAnimations)
|
23
21
|
}
|
24
22
|
|
23
|
+
@MainActor
|
25
24
|
func snapshot(_ name: String, waitForLoadingIndicator: Bool) {
|
26
25
|
if waitForLoadingIndicator {
|
27
26
|
Snapshot.snapshot(name)
|
@@ -33,6 +32,7 @@ func snapshot(_ name: String, waitForLoadingIndicator: Bool) {
|
|
33
32
|
/// - Parameters:
|
34
33
|
/// - name: The name of the snapshot
|
35
34
|
/// - timeout: Amount of seconds to wait until the network loading indicator disappears. Pass `0` if you don't want to wait.
|
35
|
+
@MainActor
|
36
36
|
func snapshot(_ name: String, timeWaitingForIdle timeout: TimeInterval = 20) {
|
37
37
|
Snapshot.snapshot(name, timeWaitingForIdle: timeout)
|
38
38
|
}
|
@@ -52,6 +52,7 @@ enum SnapshotError: Error, CustomDebugStringConvertible {
|
|
52
52
|
}
|
53
53
|
|
54
54
|
@objcMembers
|
55
|
+
@MainActor
|
55
56
|
open class Snapshot: NSObject {
|
56
57
|
static var app: XCUIApplication?
|
57
58
|
static var waitForAnimations = true
|
@@ -59,6 +60,8 @@ open class Snapshot: NSObject {
|
|
59
60
|
static var screenshotsDirectory: URL? {
|
60
61
|
return cacheDirectory?.appendingPathComponent("screenshots", isDirectory: true)
|
61
62
|
}
|
63
|
+
static var deviceLanguage = ""
|
64
|
+
static var currentLocale = ""
|
62
65
|
|
63
66
|
open class func setupSnapshot(_ app: XCUIApplication, waitForAnimations: Bool = true) {
|
64
67
|
|
@@ -103,17 +106,17 @@ open class Snapshot: NSObject {
|
|
103
106
|
|
104
107
|
do {
|
105
108
|
let trimCharacterSet = CharacterSet.whitespacesAndNewlines
|
106
|
-
|
109
|
+
currentLocale = try String(contentsOf: path, encoding: .utf8).trimmingCharacters(in: trimCharacterSet)
|
107
110
|
} catch {
|
108
111
|
NSLog("Couldn't detect/set locale...")
|
109
112
|
}
|
110
113
|
|
111
|
-
if
|
112
|
-
|
114
|
+
if currentLocale.isEmpty && !deviceLanguage.isEmpty {
|
115
|
+
currentLocale = Locale(identifier: deviceLanguage).identifier
|
113
116
|
}
|
114
117
|
|
115
|
-
if !
|
116
|
-
app.launchArguments += ["-AppleLocale", "\"\(
|
118
|
+
if !currentLocale.isEmpty {
|
119
|
+
app.launchArguments += ["-AppleLocale", "\"\(currentLocale)\""]
|
117
120
|
}
|
118
121
|
}
|
119
122
|
|
@@ -281,6 +284,7 @@ private extension XCUIElementQuery {
|
|
281
284
|
return self.containing(isNetworkLoadingIndicator)
|
282
285
|
}
|
283
286
|
|
287
|
+
@MainActor
|
284
288
|
var deviceStatusBars: XCUIElementQuery {
|
285
289
|
guard let app = Snapshot.app else {
|
286
290
|
fatalError("XCUIApplication is not set. Please call setupSnapshot(app) before snapshot().")
|
@@ -306,4 +310,4 @@ private extension CGFloat {
|
|
306
310
|
|
307
311
|
// Please don't remove the lines below
|
308
312
|
// They are used to detect outdated configuration files
|
309
|
-
// SnapshotHelperVersion [1.
|
313
|
+
// SnapshotHelperVersion [1.30]
|
@@ -84,6 +84,15 @@ module Snapshot
|
|
84
84
|
{
|
85
85
|
# snapshot in Xcode 9 saves screenshots with the SIMULATOR_DEVICE_NAME
|
86
86
|
# which includes spaces
|
87
|
+
'iPhone 15 Pro Max' => "iPhone 15 Pro Max",
|
88
|
+
'iPhone 15 Pro' => "iPhone 15 Pro",
|
89
|
+
'iPhone 15 Plus' => "iPhone 15 Plus",
|
90
|
+
'iPhone 15' => "iPhone 15",
|
91
|
+
'iPhone 14 Pro Max' => "iPhone 14 Pro Max",
|
92
|
+
'iPhone 14 Pro' => "iPhone 14 Pro",
|
93
|
+
'iPhone 14 Plus' => "iPhone 14 Plus",
|
94
|
+
'iPhone 14' => "iPhone 14",
|
95
|
+
'iPhone SE (3rd generation)' => "iPhone SE (3rd generation)",
|
87
96
|
'iPhone 13 Pro Max' => "iPhone 13 Pro Max",
|
88
97
|
'iPhone 13 Pro' => "iPhone 13 Pro",
|
89
98
|
'iPhone 13 mini' => "iPhone 13 mini",
|
@@ -92,6 +101,7 @@ module Snapshot
|
|
92
101
|
'iPhone 12 Pro' => "iPhone 12 Pro",
|
93
102
|
'iPhone 12 mini' => "iPhone 12 mini",
|
94
103
|
'iPhone 12' => "iPhone 12",
|
104
|
+
'iPhone SE (2nd generation)' => "iPhone SE (2nd generation)",
|
95
105
|
'iPhone 11 Pro Max' => "iPhone 11 Pro Max",
|
96
106
|
'iPhone 11 Pro' => "iPhone 11 Pro",
|
97
107
|
'iPhone 11' => "iPhone 11",
|
@@ -112,20 +122,34 @@ module Snapshot
|
|
112
122
|
'iPhone SE' => "iPhone SE",
|
113
123
|
'iPhone 4s' => "iPhone 4s (3.5-Inch)",
|
114
124
|
'iPad 2' => 'iPad 2',
|
125
|
+
'iPad Air (5th generation)' => 'iPad Air (5th generation)',
|
126
|
+
'iPad Air (4th generation)' => 'iPad Air (4th generation)',
|
115
127
|
'iPad Air (3rd generation)' => 'iPad Air (3rd generation)',
|
116
128
|
'iPad Air 2' => 'iPad Air 2',
|
117
129
|
'iPad Air' => 'iPad Air',
|
118
|
-
'iPad (
|
130
|
+
'iPad (10th generation)' => 'iPad (10th generation)',
|
131
|
+
'iPad (9th generation)' => 'iPad (9th generation)',
|
132
|
+
'iPad (8th generation)' => 'iPad (8th generation)',
|
119
133
|
'iPad (7th generation)' => 'iPad (7th generation)',
|
120
|
-
'iPad
|
121
|
-
'iPad
|
122
|
-
'iPad mini 4' => 'iPad mini 4',
|
134
|
+
'iPad (6th generation)' => 'iPad (6th generation)',
|
135
|
+
'iPad (5th generation)' => 'iPad (5th generation)',
|
123
136
|
'iPad mini (6th generation)' => 'iPad mini (6th generation)',
|
137
|
+
'iPad mini (5th generation)' => 'iPad mini (5th generation)',
|
138
|
+
'iPad mini 4' => 'iPad mini 4',
|
139
|
+
'iPad mini 3' => 'iPad mini 3',
|
140
|
+
'iPad mini 2' => 'iPad mini 2',
|
124
141
|
'iPad Pro (9.7-inch)' => 'iPad Pro (9.7-inch)',
|
125
142
|
'iPad Pro (9.7 inch)' => 'iPad Pro (9.7-inch)', # iOS 10.3.1 simulator
|
126
143
|
'iPad Pro (10.5-inch)' => 'iPad Pro (10.5-inch)',
|
144
|
+
'iPad Pro (11-inch) (4th generation) (16GB)' => 'iPad Pro (11-inch) (4th generation) (16GB)',
|
145
|
+
'iPad Pro (11-inch) (4th generation)' => 'iPad Pro (11-inch) (4th generation)',
|
146
|
+
'iPad Pro (11-inch) (3rd generation)' => 'iPad Pro (11-inch) (3rd generation)',
|
127
147
|
'iPad Pro (11-inch) (2nd generation)' => 'iPad Pro (11-inch) (2nd generation)',
|
148
|
+
'iPad Pro (11-inch) (1st generation)' => 'iPad Pro (11-inch) (1st generation)',
|
128
149
|
'iPad Pro (11-inch)' => 'iPad Pro (11-inch)',
|
150
|
+
'iPad Pro (12.9-inch) (6th generation) (16GB)' => 'iPad Pro (12.9-inch) (6th generation) (16GB)',
|
151
|
+
'iPad Pro (12.9-inch) (6th generation)' => 'iPad Pro (12.9-inch) (6th generation)',
|
152
|
+
'iPad Pro (12.9-inch) (5th generation)' => 'iPad Pro (12.9-inch) (5th generation)',
|
129
153
|
'iPad Pro (12.9-inch) (4th generation)' => 'iPad Pro (12.9-inch) (4th generation)',
|
130
154
|
'iPad Pro (12.9-inch) (3rd generation)' => 'iPad Pro (12.9-inch) (3rd generation)',
|
131
155
|
'iPad Pro (12.9-inch) (2nd generation)' => 'iPad Pro (12.9-inch) (2nd generation)',
|
@@ -133,13 +157,30 @@ module Snapshot
|
|
133
157
|
'iPad Pro (12.9 inch)' => 'iPad Pro (12.9-inch)', # iOS 10.3.1 simulator
|
134
158
|
'iPad Pro' => 'iPad Pro (12.9-inch)', # iOS 9.3 simulator
|
135
159
|
'iPod touch (7th generation)' => 'iPod touch (7th generation)',
|
136
|
-
'Apple TV
|
160
|
+
'Apple TV 4K (3rd generation)' => 'Apple TV 4K (3rd generation)',
|
161
|
+
'Apple TV 4K (3rd generation) (at 1080p)' => 'Apple TV 4K (3rd generation) (at 1080p)',
|
162
|
+
'Apple TV 4K (2nd generation)' => 'Apple TV 4K (2nd generation)',
|
163
|
+
'Apple TV 4K (2nd generation) (at 1080p)' => 'Apple TV 4K (2nd generation) (at 1080p)',
|
137
164
|
'Apple TV 4K (at 1080p)' => 'Apple TV 4K (at 1080p)',
|
138
165
|
'Apple TV 4K' => 'Apple TV 4K',
|
166
|
+
'Apple TV 1080p' => 'Apple TV',
|
139
167
|
'Apple TV' => 'Apple TV',
|
140
168
|
'Mac' => 'Mac',
|
141
|
-
'Apple Watch
|
142
|
-
'Apple Watch
|
169
|
+
'Apple Watch Ultra 2 (49mm)' => 'Apple Watch Ultra 2 (49mm)',
|
170
|
+
'Apple Watch SE (44mm)' => 'Apple Watch SE (44mm)',
|
171
|
+
'Apple Watch SE (40mm)' => 'Apple Watch SE (40mm)',
|
172
|
+
'Apple Watch Series 9 (45mm)' => 'Apple Watch Series 9 (45mm)',
|
173
|
+
'Apple Watch Series 9 (41mm)' => 'Apple Watch Series 9 (41mm)',
|
174
|
+
'Apple Watch Series 8 (45mm)' => 'Apple Watch Series 8 (45mm)',
|
175
|
+
'Apple Watch Series 8 (41mm)' => 'Apple Watch Series 8 (41mm)',
|
176
|
+
'Apple Watch Series 7 (45mm)' => 'Apple Watch Series 7 (45mm)',
|
177
|
+
'Apple Watch Series 7 (41mm)' => 'Apple Watch Series 7 (41mm)',
|
178
|
+
'Apple Watch Series 6 (44mm)' => 'Apple Watch Series 6 (44mm)',
|
179
|
+
'Apple Watch Series 6 (40mm)' => 'Apple Watch Series 6 (40mm)',
|
180
|
+
'Apple Watch Series 5 (44mm)' => 'Apple Watch Series 5 (44mm)',
|
181
|
+
'Apple Watch Series 5 (40mm)' => 'Apple Watch Series 5 (40mm)',
|
182
|
+
'Apple Watch Series 6 - 44mm' => 'Apple Watch Series 6 - 44mm',
|
183
|
+
'Apple Watch Series 5 - 44mm' => 'Apple Watch Series 5 - 44mm'
|
143
184
|
}
|
144
185
|
end
|
145
186
|
|
@@ -19,7 +19,7 @@ module Snapshot
|
|
19
19
|
|
20
20
|
if File.exist?(snapfile_path)
|
21
21
|
if print_instructions_on_failure
|
22
|
-
print_instructions(snapshot_helper_filename: snapshot_helper_filename
|
22
|
+
print_instructions(snapshot_helper_filename: snapshot_helper_filename)
|
23
23
|
return
|
24
24
|
else
|
25
25
|
UI.user_error!("Snapfile already exists at path '#{snapfile_path}'. Run 'fastlane snapshot' to generate screenshots.")
|
@@ -37,7 +37,7 @@ module Snapshot
|
|
37
37
|
print_instructions(snapshot_helper_filename: snapshot_helper_filename, snapfile_path: snapfile_path)
|
38
38
|
end
|
39
39
|
|
40
|
-
def self.print_instructions(snapshot_helper_filename: nil
|
40
|
+
def self.print_instructions(snapshot_helper_filename: nil)
|
41
41
|
puts("Open your Xcode project and make sure to do the following:".yellow)
|
42
42
|
puts("1) Add a new UI Test target to your project".yellow)
|
43
43
|
puts("2) Add the ./fastlane/#{snapshot_helper_filename} to your UI Test target".yellow)
|
@@ -109,33 +109,34 @@ module Snapshot
|
|
109
109
|
end
|
110
110
|
}
|
111
111
|
]
|
112
|
+
error_proc = proc do |output, return_code|
|
113
|
+
self.collected_errors.concat(failed_devices.map do |device, messages|
|
114
|
+
"#{device}: #{messages.join(', ')}"
|
115
|
+
end)
|
116
|
+
|
117
|
+
cleanup_after_failure(devices, language, locale, launch_args, return_code)
|
118
|
+
|
119
|
+
# no exception raised... that means we need to retry
|
120
|
+
UI.error("Caught error... #{return_code}")
|
121
|
+
|
122
|
+
self.current_number_of_retries_due_to_failing_simulator += 1
|
123
|
+
if self.current_number_of_retries_due_to_failing_simulator < 20 && return_code != 65
|
124
|
+
# If the return code is not 65, we should assume its a simulator failure and retry
|
125
|
+
launch_simultaneously(devices, language, locale, launch_args)
|
126
|
+
elsif retries < launcher_config.number_of_retries
|
127
|
+
# If there are retries remaining, run the tests again
|
128
|
+
retry_tests(retries, command, language, locale, launch_args, devices)
|
129
|
+
else
|
130
|
+
# It's important to raise an error, as we don't want to collect the screenshots
|
131
|
+
UI.crash!("Too many errors... no more retries...") if launcher_config.stop_after_first_error
|
132
|
+
end
|
133
|
+
end
|
112
134
|
FastlaneCore::CommandExecutor.execute(command: command,
|
113
135
|
print_all: true,
|
114
136
|
print_command: true,
|
115
137
|
prefix: prefix_hash,
|
116
138
|
loading: "Loading...",
|
117
|
-
error:
|
118
|
-
self.collected_errors.concat(failed_devices.map do |device, messages|
|
119
|
-
"#{device}: #{messages.join(', ')}"
|
120
|
-
end)
|
121
|
-
|
122
|
-
cleanup_after_failure(devices, language, locale, launch_args, return_code)
|
123
|
-
|
124
|
-
# no exception raised... that means we need to retry
|
125
|
-
UI.error("Caught error... #{return_code}")
|
126
|
-
|
127
|
-
self.current_number_of_retries_due_to_failing_simulator += 1
|
128
|
-
if self.current_number_of_retries_due_to_failing_simulator < 20 && return_code != 65
|
129
|
-
# If the return code is not 65, we should assume its a simulator failure and retry
|
130
|
-
launch_simultaneously(devices, language, locale, launch_args)
|
131
|
-
elsif retries < launcher_config.number_of_retries
|
132
|
-
# If there are retries remaining, run the tests again
|
133
|
-
retry_tests(retries, command, language, locale, launch_args, devices)
|
134
|
-
else
|
135
|
-
# It's important to raise an error, as we don't want to collect the screenshots
|
136
|
-
UI.crash!("Too many errors... no more retries...") if launcher_config.stop_after_first_error
|
137
|
-
end
|
138
|
-
end)
|
139
|
+
error: error_proc)
|
139
140
|
end
|
140
141
|
|
141
142
|
def cleanup_after_failure(devices, language, locale, launch_args, return_code)
|
@@ -107,7 +107,7 @@ module Snapshot
|
|
107
107
|
output = Helper.backticks("xcrun simctl addmedia #{device_udid} #{path.shellescape} &> /dev/null")
|
108
108
|
|
109
109
|
# Run legacy addphoto and addvideo if addmedia isn't found
|
110
|
-
# Output will be empty
|
110
|
+
# Output will be empty string if it was a success
|
111
111
|
# Output will contain "usage: simctl" if command not found
|
112
112
|
if output.include?('usage: simctl')
|
113
113
|
Helper.backticks("xcrun simctl add#{media_type} #{device_udid} #{path.shellescape} &> /dev/null")
|
@@ -124,7 +124,7 @@ module Snapshot
|
|
124
124
|
Helper.backticks("xcrun simctl bootstatus #{device_udid} -b &> /dev/null")
|
125
125
|
|
126
126
|
# "Booted" status is not enough for to adjust the status bar
|
127
|
-
# Simulator could
|
127
|
+
# Simulator could still be booting with Apple logo
|
128
128
|
# Need to wait "some amount of time" until home screen shows
|
129
129
|
boot_sleep = ENV["SNAPSHOT_SIMULATOR_WAIT_FOR_BOOT_TIMEOUT"].to_i || 10
|
130
130
|
UI.message("Waiting #{boot_sleep} seconds for device to fully boot before overriding status bar... Set 'SNAPSHOT_SIMULATOR_WAIT_FOR_BOOT_TIMEOUT' environment variable to adjust timeout")
|
@@ -429,7 +429,7 @@ module Spaceship
|
|
429
429
|
# which is common, as the session automatically invalidates after x hours (we don't know x)
|
430
430
|
# In this case we don't actually care about the exact exception, and why it was failing
|
431
431
|
# because either way, we'll have to do a fresh login, where we do the actual error handling
|
432
|
-
puts("Available session is not valid
|
432
|
+
puts("Available session is not valid anymore. Continuing with normal login.")
|
433
433
|
end
|
434
434
|
end
|
435
435
|
#
|
@@ -65,7 +65,7 @@ module Spaceship
|
|
65
65
|
end
|
66
66
|
|
67
67
|
# Instance level hostname only used when creating
|
68
|
-
# App Store Connect API
|
68
|
+
# App Store Connect API Faraday client.
|
69
69
|
# Forwarding to class level if using web session.
|
70
70
|
def hostname
|
71
71
|
if @token
|
@@ -87,13 +87,14 @@ module Spaceship
|
|
87
87
|
return @token.nil?
|
88
88
|
end
|
89
89
|
|
90
|
-
def build_params(filter: nil, includes: nil, limit: nil, sort: nil, cursor: nil)
|
90
|
+
def build_params(filter: nil, includes: nil, fields: nil, limit: nil, sort: nil, cursor: nil)
|
91
91
|
params = {}
|
92
92
|
|
93
93
|
filter = filter.delete_if { |k, v| v.nil? } if filter
|
94
94
|
|
95
95
|
params[:filter] = filter if filter && !filter.empty?
|
96
96
|
params[:include] = includes if includes
|
97
|
+
params[:fields] = fields if fields
|
97
98
|
params[:limit] = limit if limit
|
98
99
|
params[:sort] = sort if sort
|
99
100
|
params[:cursor] = cursor if cursor
|
@@ -84,13 +84,13 @@ module Spaceship
|
|
84
84
|
# Extending this instance to add API endpoints from these modules
|
85
85
|
# Each of these modules adds a new setter method for an instance
|
86
86
|
# of an ConnectAPI::APIClient
|
87
|
-
# These get set in
|
87
|
+
# These get set in set_individual_clients
|
88
88
|
self.extend(Spaceship::ConnectAPI::TestFlight::API)
|
89
89
|
self.extend(Spaceship::ConnectAPI::Tunes::API)
|
90
90
|
self.extend(Spaceship::ConnectAPI::Provisioning::API)
|
91
91
|
self.extend(Spaceship::ConnectAPI::Users::API)
|
92
92
|
|
93
|
-
|
93
|
+
set_individual_clients(
|
94
94
|
cookie: cookie,
|
95
95
|
current_team_id: current_team_id,
|
96
96
|
token: token,
|
@@ -155,7 +155,7 @@ module Spaceship
|
|
155
155
|
|
156
156
|
# Updating the tunes and portal clients requires resetting
|
157
157
|
# of the clients in the API modules
|
158
|
-
|
158
|
+
set_individual_clients(
|
159
159
|
cookie: nil,
|
160
160
|
current_team_id: nil,
|
161
161
|
token: nil,
|
@@ -166,7 +166,7 @@ module Spaceship
|
|
166
166
|
|
167
167
|
private
|
168
168
|
|
169
|
-
def
|
169
|
+
def set_individual_clients(cookie: nil, current_team_id: nil, token: nil, tunes_client: nil, portal_client: nil)
|
170
170
|
# This was added by Spaceship::ConnectAPI::TestFlight::API and is required
|
171
171
|
# to be set for API methods to have a client to send request on
|
172
172
|
if cookie || token || tunes_client
|
@@ -17,6 +17,7 @@ module Spaceship
|
|
17
17
|
IPHONE_55 = "IPHONE_55"
|
18
18
|
IPHONE_58 = "IPHONE_58"
|
19
19
|
IPHONE_65 = "IPHONE_65"
|
20
|
+
IPHONE_67 = "IPHONE_67"
|
20
21
|
|
21
22
|
IPAD_97 = "IPAD_97"
|
22
23
|
IPAD_105 = "IPAD_105"
|
@@ -33,6 +34,7 @@ module Spaceship
|
|
33
34
|
IPHONE_55,
|
34
35
|
IPHONE_58,
|
35
36
|
IPHONE_65,
|
37
|
+
IPHONE_67,
|
36
38
|
|
37
39
|
IPAD_97,
|
38
40
|
IPAD_105,
|
@@ -103,7 +103,7 @@ module Spaceship
|
|
103
103
|
# will result in a false failure. The response will return a 503 but the database
|
104
104
|
# insert will eventually go through.
|
105
105
|
#
|
106
|
-
# When this is observed, we will poll until we find the
|
106
|
+
# When this is observed, we will poll until we find the matching screenshot that
|
107
107
|
# is awaiting for upload and file size
|
108
108
|
#
|
109
109
|
# https://github.com/fastlane/fastlane/pull/16842
|
@@ -143,7 +143,7 @@ module Spaceship
|
|
143
143
|
}
|
144
144
|
|
145
145
|
# Patch screenshot that file upload is complete
|
146
|
-
# Catch error if patch retries due to 504.
|
146
|
+
# Catch error if patch retries due to 504. Original patch
|
147
147
|
# may go through by return response as 504.
|
148
148
|
begin
|
149
149
|
screenshot = Spaceship::ConnectAPI.patch_app_screenshot(
|
@@ -43,6 +43,7 @@ module Spaceship
|
|
43
43
|
APP_WATCH_SERIES_3 = "APP_WATCH_SERIES_3"
|
44
44
|
APP_WATCH_SERIES_4 = "APP_WATCH_SERIES_4"
|
45
45
|
APP_WATCH_SERIES_7 = "APP_WATCH_SERIES_7"
|
46
|
+
APP_WATCH_ULTRA = "APP_WATCH_ULTRA"
|
46
47
|
|
47
48
|
APP_APPLE_TV = "APP_APPLE_TV"
|
48
49
|
|
@@ -97,6 +98,7 @@ module Spaceship
|
|
97
98
|
APP_WATCH_SERIES_3,
|
98
99
|
APP_WATCH_SERIES_4,
|
99
100
|
APP_WATCH_SERIES_7,
|
101
|
+
APP_WATCH_ULTRA,
|
100
102
|
|
101
103
|
APP_DESKTOP
|
102
104
|
]
|
@@ -1,4 +1,4 @@
|
|
1
|
-
require_relative '
|
1
|
+
require_relative '../../connect_api'
|
2
2
|
require_relative './bundle_id_capability'
|
3
3
|
module Spaceship
|
4
4
|
class ConnectAPI
|
@@ -39,15 +39,15 @@ module Spaceship
|
|
39
39
|
# API
|
40
40
|
#
|
41
41
|
|
42
|
-
def self.all(client: nil, filter: {}, includes: nil,
|
42
|
+
def self.all(client: nil, filter: {}, includes: nil, fields: nil, limit: Spaceship::ConnectAPI::MAX_OBJECTS_PER_PAGE_LIMIT, sort: nil)
|
43
43
|
client ||= Spaceship::ConnectAPI
|
44
|
-
resps = client.get_bundle_ids(filter: filter, includes: includes).all_pages
|
44
|
+
resps = client.get_bundle_ids(filter: filter, includes: includes, fields: fields, limit: nil, sort: nil).all_pages
|
45
45
|
return resps.flat_map(&:to_models)
|
46
46
|
end
|
47
47
|
|
48
|
-
def self.find(identifier, includes: nil, client: nil)
|
48
|
+
def self.find(identifier, includes: nil, fields: nil, client: nil)
|
49
49
|
client ||= Spaceship::ConnectAPI
|
50
|
-
return all(client: client, filter: { identifier: identifier }, includes: includes).find do |app|
|
50
|
+
return all(client: client, filter: { identifier: identifier }, includes: includes, fields: fields).find do |app|
|
51
51
|
app.identifier == identifier
|
52
52
|
end
|
53
53
|
end
|
@@ -1,4 +1,4 @@
|
|
1
|
-
require_relative '
|
1
|
+
require_relative '../../connect_api'
|
2
2
|
|
3
3
|
require 'openssl'
|
4
4
|
|
@@ -79,9 +79,9 @@ module Spaceship
|
|
79
79
|
# API
|
80
80
|
#
|
81
81
|
|
82
|
-
def self.all(client: nil, filter: {}, includes: nil,
|
82
|
+
def self.all(client: nil, filter: {}, includes: nil, fields: nil, limit: Spaceship::ConnectAPI::MAX_OBJECTS_PER_PAGE_LIMIT, sort: nil)
|
83
83
|
client ||= Spaceship::ConnectAPI
|
84
|
-
resps = client.get_certificates(filter: filter, includes: includes).all_pages
|
84
|
+
resps = client.get_certificates(filter: filter, includes: includes, fields: fields, limit: limit, sort: sort).all_pages
|
85
85
|
return resps.flat_map(&:to_models)
|
86
86
|
end
|
87
87
|
|