fastlane 2.195.0 → 2.213.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/LICENSE +1 -1
- data/README.md +96 -89
- data/cert/lib/cert/runner.rb +19 -8
- data/deliver/lib/assets/ScreenshotsHelp +29 -6
- data/deliver/lib/deliver/app_screenshot.rb +30 -4
- data/deliver/lib/deliver/app_screenshot_iterator.rb +1 -1
- data/deliver/lib/deliver/options.rb +6 -2
- data/deliver/lib/deliver/runner.rb +88 -24
- data/deliver/lib/deliver/submit_for_review.rb +25 -3
- data/deliver/lib/deliver/upload_price_tier.rb +3 -1
- data/deliver/lib/deliver/upload_screenshots.rb +2 -2
- data/fastlane/lib/assets/AppfileTemplate +1 -1
- data/fastlane/lib/assets/AppfileTemplate.swift +1 -1
- data/fastlane/lib/fastlane/actions/app_store_build_number.rb +12 -6
- data/fastlane/lib/fastlane/actions/badge.rb +1 -1
- data/fastlane/lib/fastlane/actions/changelog_from_git_commits.rb +1 -1
- data/fastlane/lib/fastlane/actions/danger.rb +14 -0
- data/fastlane/lib/fastlane/actions/docs/build_app.md +5 -5
- data/fastlane/lib/fastlane/actions/docs/capture_android_screenshots.md +19 -2
- data/fastlane/lib/fastlane/actions/docs/frame_screenshots.md +1 -1
- data/fastlane/lib/fastlane/actions/docs/run_tests.md +1 -1
- data/fastlane/lib/fastlane/actions/docs/upload_to_app_store.md.erb +1 -1
- data/fastlane/lib/fastlane/actions/download_dsyms.rb +62 -46
- data/fastlane/lib/fastlane/actions/ensure_git_status_clean.rb +44 -5
- data/fastlane/lib/fastlane/actions/ensure_xcode_version.rb +1 -1
- data/fastlane/lib/fastlane/actions/get_push_certificate.rb +1 -1
- data/fastlane/lib/fastlane/actions/get_version_number.rb +8 -3
- data/fastlane/lib/fastlane/actions/git_commit.rb +4 -6
- data/fastlane/lib/fastlane/actions/import_certificate.rb +1 -1
- data/fastlane/lib/fastlane/actions/latest_testflight_build_number.rb +2 -3
- data/fastlane/lib/fastlane/actions/notarize.rb +29 -11
- data/fastlane/lib/fastlane/actions/pod_lib_lint.rb +1 -1
- data/fastlane/lib/fastlane/actions/pod_push.rb +19 -1
- data/fastlane/lib/fastlane/actions/read_podspec.rb +1 -1
- data/fastlane/lib/fastlane/actions/run_tests.rb +19 -9
- data/fastlane/lib/fastlane/actions/set_github_release.rb +11 -5
- data/fastlane/lib/fastlane/actions/setup_ci.rb +13 -4
- data/fastlane/lib/fastlane/actions/trainer.rb +49 -0
- data/fastlane/lib/fastlane/actions/update_code_signing_settings.rb +31 -4
- data/fastlane/lib/fastlane/actions/update_info_plist.rb +1 -1
- data/fastlane/lib/fastlane/actions/update_project_provisioning.rb +10 -1
- data/fastlane/lib/fastlane/actions/upload_symbols_to_sentry.rb +1 -1
- data/fastlane/lib/fastlane/actions/verify_build.rb +1 -1
- data/fastlane/lib/fastlane/actions/xcode_install.rb +5 -1
- data/fastlane/lib/fastlane/actions/xcode_select.rb +1 -1
- data/fastlane/lib/fastlane/actions/xcodebuild.rb +8 -2
- data/fastlane/lib/fastlane/actions/xcodes.rb +152 -0
- data/fastlane/lib/fastlane/actions/xcov.rb +5 -0
- data/fastlane/lib/fastlane/actions/xcversion.rb +17 -7
- data/fastlane/lib/fastlane/cli_tools_distributor.rb +5 -0
- data/fastlane/lib/fastlane/commands_generator.rb +2 -1
- data/fastlane/lib/fastlane/documentation/docs_generator.rb +17 -12
- data/fastlane/lib/fastlane/fast_file.rb +18 -5
- data/fastlane/lib/fastlane/features.rb +3 -0
- data/fastlane/lib/fastlane/helper/xcodebuild_formatter_helper.rb +9 -0
- data/fastlane/lib/fastlane/helper/xcodes_helper.rb +28 -0
- data/fastlane/lib/fastlane/helper/xcversion_helper.rb +0 -9
- data/fastlane/lib/fastlane/lane_manager.rb +1 -1
- data/fastlane/lib/fastlane/plugins/template/%gem_name%.gemspec.erb +1 -1
- data/fastlane/lib/fastlane/plugins/template/.rubocop.yml +5 -1
- data/fastlane/lib/fastlane/setup/setup_ios.rb +1 -1
- data/fastlane/lib/fastlane/swift_fastlane_api_generator.rb +1 -1
- data/fastlane/lib/fastlane/swift_lane_manager.rb +11 -3
- data/fastlane/lib/fastlane/swift_runner_upgrader.rb +54 -1
- data/fastlane/lib/fastlane/tools.rb +18 -1
- data/fastlane/lib/fastlane/version.rb +1 -1
- data/fastlane/swift/Actions.swift +1 -1
- data/fastlane/swift/Appfile.swift +2 -2
- data/fastlane/swift/ArgumentProcessor.swift +1 -1
- data/fastlane/swift/Atomic.swift +150 -0
- data/fastlane/swift/ControlCommand.swift +1 -1
- data/fastlane/swift/Deliverfile.swift +2 -2
- data/fastlane/swift/DeliverfileProtocol.swift +8 -4
- data/fastlane/swift/Fastlane.swift +604 -249
- data/fastlane/swift/FastlaneSwiftRunner/FastlaneSwiftRunner.xcodeproj/project.pbxproj +30 -20
- data/fastlane/swift/FastlaneSwiftRunner/FastlaneSwiftRunner.xcodeproj/xcshareddata/xcschemes/FastlaneRunner.xcscheme +1 -1
- data/fastlane/swift/Gymfile.swift +2 -2
- data/fastlane/swift/GymfileProtocol.swift +20 -8
- data/fastlane/swift/LaneFileProtocol.swift +3 -3
- data/fastlane/swift/MainProcess.swift +3 -3
- data/fastlane/swift/Matchfile.swift +2 -2
- data/fastlane/swift/MatchfileProtocol.swift +25 -5
- 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 +3 -3
- data/fastlane/swift/RubyCommand.swift +1 -1
- data/fastlane/swift/RubyCommandable.swift +1 -1
- data/fastlane/swift/Runner.swift +14 -10
- data/fastlane/swift/RunnerArgument.swift +1 -1
- data/fastlane/swift/Scanfile.swift +2 -2
- data/fastlane/swift/ScanfileProtocol.swift +35 -11
- data/fastlane/swift/Screengrabfile.swift +2 -2
- data/fastlane/swift/ScreengrabfileProtocol.swift +5 -5
- data/fastlane/swift/Snapshotfile.swift +2 -2
- data/fastlane/swift/SnapshotfileProtocol.swift +12 -8
- data/fastlane/swift/SocketClient.swift +9 -5
- data/fastlane/swift/SocketClientDelegateProtocol.swift +2 -2
- data/fastlane/swift/SocketResponse.swift +1 -1
- data/fastlane/swift/formatting/Brewfile.lock.json +47 -24
- data/fastlane/swift/main.swift +1 -1
- data/fastlane/swift/upgrade_manifest.json +1 -1
- data/fastlane_core/README.md +1 -0
- data/fastlane_core/lib/fastlane_core/cert_checker.rb +74 -17
- data/fastlane_core/lib/fastlane_core/device_manager.rb +5 -1
- data/fastlane_core/lib/fastlane_core/ipa_file_analyser.rb +10 -5
- data/fastlane_core/lib/fastlane_core/itunes_transporter.rb +409 -26
- data/fastlane_core/lib/fastlane_core/keychain_importer.rb +1 -0
- data/fastlane_core/lib/fastlane_core/project.rb +19 -2
- data/fastlane_core/lib/fastlane_core/ui/fastlane_runner.rb +7 -0
- data/fastlane_core/lib/fastlane_core/ui/implementations/shell.rb +4 -2
- data/frameit/lib/frameit/device.rb +1 -1
- data/frameit/lib/frameit/device_types.rb +9 -0
- data/frameit/lib/frameit/editor.rb +16 -18
- data/frameit/lib/frameit/frame_downloader.rb +1 -1
- data/frameit/lib/frameit/trim_box.rb +6 -0
- data/gym/lib/gym/generators/build_command_generator.rb +70 -23
- data/gym/lib/gym/options.rb +30 -5
- data/match/lib/match/change_password.rb +2 -0
- data/match/lib/match/commands_generator.rb +2 -1
- data/match/lib/match/encryption/openssl.rb +1 -1
- data/match/lib/match/encryption.rb +3 -0
- data/match/lib/match/generator.rb +1 -0
- data/match/lib/match/importer.rb +11 -1
- data/match/lib/match/migrate.rb +4 -3
- data/match/lib/match/module.rb +54 -2
- data/match/lib/match/nuke.rb +115 -47
- data/match/lib/match/options.rb +27 -1
- data/match/lib/match/runner.rb +26 -6
- data/match/lib/match/setup.rb +1 -1
- data/match/lib/match/spaceship_ensure.rb +5 -2
- data/match/lib/match/storage/gitlab/client.rb +102 -0
- data/match/lib/match/storage/gitlab/secure_file.rb +65 -0
- data/match/lib/match/storage/gitlab_secure_files.rb +188 -0
- data/match/lib/match/storage/google_cloud_storage.rb +7 -6
- data/match/lib/match/storage/s3_storage.rb +3 -3
- data/match/lib/match/storage.rb +4 -0
- data/match/lib/match/table_printer.rb +2 -1
- data/match/lib/match/utils.rb +15 -2
- data/pem/lib/pem/manager.rb +32 -8
- data/pem/lib/pem/options.rb +10 -1
- data/pilot/lib/pilot/build_manager.rb +34 -14
- data/pilot/lib/pilot/options.rb +6 -1
- data/scan/lib/scan/detect_values.rb +14 -1
- data/scan/lib/scan/error_handler.rb +9 -0
- data/scan/lib/scan/options.rb +54 -9
- data/scan/lib/scan/runner.rb +171 -25
- data/scan/lib/scan/test_command_generator.rb +65 -5
- data/screengrab/lib/screengrab/options.rb +2 -2
- data/sigh/lib/assets/resign.sh +8 -5
- data/sigh/lib/sigh/download_all.rb +14 -2
- data/sigh/lib/sigh/module.rb +3 -1
- data/sigh/lib/sigh/options.rb +5 -0
- data/sigh/lib/sigh/runner.rb +12 -2
- data/snapshot/lib/assets/SnapshotHelper.swift +3 -3
- data/snapshot/lib/snapshot/latest_os_version.rb +2 -5
- data/snapshot/lib/snapshot/options.rb +24 -8
- data/snapshot/lib/snapshot/reports_generator.rb +9 -0
- data/snapshot/lib/snapshot/simulator_launchers/simulator_launcher_base.rb +10 -3
- data/snapshot/lib/snapshot/test_command_generator.rb +37 -2
- data/spaceship/lib/spaceship/client.rb +71 -40
- data/spaceship/lib/spaceship/commands_generator.rb +1 -1
- data/spaceship/lib/spaceship/connect_api/api_client.rb +10 -5
- data/spaceship/lib/spaceship/connect_api/models/actor.rb +26 -0
- data/spaceship/lib/spaceship/connect_api/models/app.rb +52 -6
- data/spaceship/lib/spaceship/connect_api/models/app_info.rb +1 -0
- data/spaceship/lib/spaceship/connect_api/models/app_info_localization.rb +5 -0
- data/spaceship/lib/spaceship/connect_api/models/app_screenshot_set.rb +7 -0
- data/spaceship/lib/spaceship/connect_api/models/app_store_version.rb +1 -1
- data/spaceship/lib/spaceship/connect_api/models/app_store_version_localization.rb +27 -10
- data/spaceship/lib/spaceship/connect_api/models/build.rb +4 -2
- data/spaceship/lib/spaceship/connect_api/models/build_bundle.rb +68 -0
- data/spaceship/lib/spaceship/connect_api/models/build_bundle_file_sizes.rb +34 -0
- data/spaceship/lib/spaceship/connect_api/models/build_delivery.rb +2 -1
- data/spaceship/lib/spaceship/connect_api/models/certificate.rb +4 -0
- data/spaceship/lib/spaceship/connect_api/models/device.rb +47 -4
- data/spaceship/lib/spaceship/connect_api/models/profile.rb +4 -0
- data/spaceship/lib/spaceship/connect_api/models/resolution_center_message.rb +29 -0
- data/spaceship/lib/spaceship/connect_api/models/resolution_center_thread.rb +67 -0
- data/spaceship/lib/spaceship/connect_api/models/review_rejection.rb +19 -0
- data/spaceship/lib/spaceship/connect_api/models/review_submission.rb +86 -0
- data/spaceship/lib/spaceship/connect_api/models/review_submission_item.rb +40 -0
- data/spaceship/lib/spaceship/connect_api/models/user.rb +5 -0
- data/spaceship/lib/spaceship/connect_api/provisioning/provisioning.rb +19 -0
- data/spaceship/lib/spaceship/connect_api/response.rb +23 -6
- data/spaceship/lib/spaceship/connect_api/testflight/testflight.rb +33 -2
- data/spaceship/lib/spaceship/connect_api/token.rb +6 -3
- data/spaceship/lib/spaceship/connect_api/tunes/tunes.rb +124 -8
- data/spaceship/lib/spaceship/connect_api.rb +9 -0
- data/spaceship/lib/spaceship/errors.rb +34 -0
- data/spaceship/lib/spaceship/globals.rb +9 -0
- data/spaceship/lib/spaceship/hashcash.rb +52 -0
- data/spaceship/lib/spaceship/portal/certificate.rb +4 -3
- data/spaceship/lib/spaceship/spaceauth_runner.rb +1 -1
- data/spaceship/lib/spaceship/tunes/app_ratings.rb +6 -6
- data/spaceship/lib/spaceship/tunes/iap_families.rb +1 -1
- data/spaceship/lib/spaceship/tunes/tunes.rb +0 -1
- data/spaceship/lib/spaceship/tunes/tunes_client.rb +79 -21
- data/spaceship/lib/spaceship/two_step_or_factor_client.rb +11 -3
- data/spaceship/lib/spaceship.rb +1 -0
- data/supply/lib/supply/client.rb +5 -10
- data/supply/lib/supply/options.rb +8 -0
- data/supply/lib/supply/uploader.rb +7 -3
- data/trainer/lib/assets/junit.xml.erb +28 -0
- data/trainer/lib/trainer/commands_generator.rb +51 -0
- data/trainer/lib/trainer/junit_generator.rb +31 -0
- data/trainer/lib/trainer/module.rb +10 -0
- data/trainer/lib/trainer/options.rb +66 -0
- data/trainer/lib/trainer/test_parser.rb +398 -0
- data/trainer/lib/trainer/xcresult.rb +403 -0
- data/trainer/lib/trainer.rb +7 -0
- metadata +73 -37
- data/spaceship/lib/spaceship/tunes/user_detail.rb +0 -15
@@ -1,7 +1,7 @@
|
|
1
1
|
// ScanfileProtocol.swift
|
2
|
-
// Copyright (c)
|
2
|
+
// Copyright (c) 2023 FastlaneTools
|
3
3
|
|
4
|
-
public protocol ScanfileProtocol:
|
4
|
+
public protocol ScanfileProtocol: AnyObject {
|
5
5
|
/// Path to the workspace file
|
6
6
|
var workspace: String? { get }
|
7
7
|
|
@@ -14,10 +14,10 @@ public protocol ScanfileProtocol: class {
|
|
14
14
|
/// The project's scheme. Make sure it's marked as `Shared`
|
15
15
|
var scheme: String? { get }
|
16
16
|
|
17
|
-
/// The name of the simulator type you want to run tests on (e.g. 'iPhone 6')
|
17
|
+
/// The name of the simulator type you want to run tests on (e.g. 'iPhone 6' or 'iPhone SE (2nd generation) (14.5)')
|
18
18
|
var device: String? { get }
|
19
19
|
|
20
|
-
/// Array of devices to run the tests on (e.g. ['iPhone 6', 'iPad Air'])
|
20
|
+
/// Array of devices to run the tests on (e.g. ['iPhone 6', 'iPad Air', 'iPhone SE (2nd generation) (14.5)'])
|
21
21
|
var devices: [String]? { get }
|
22
22
|
|
23
23
|
/// Should skip auto detecting of devices if none were specified
|
@@ -80,9 +80,6 @@ public protocol ScanfileProtocol: class {
|
|
80
80
|
/// Should the HTML report be opened when tests are completed?
|
81
81
|
var openReport: Bool { get }
|
82
82
|
|
83
|
-
/// Disable xcpretty formatting of build, similar to `output_style='raw'` but this will also skip the test results table
|
84
|
-
var disableXcpretty: Bool? { get }
|
85
|
-
|
86
83
|
/// The directory in which all reports will be stored
|
87
84
|
var outputDirectory: String { get }
|
88
85
|
|
@@ -104,9 +101,21 @@ public protocol ScanfileProtocol: class {
|
|
104
101
|
/// Suppress the output of xcodebuild to stdout. Output is still saved in buildlog_path
|
105
102
|
var suppressXcodeOutput: Bool? { get }
|
106
103
|
|
107
|
-
///
|
104
|
+
/// xcodebuild formatter to use (ex: 'xcbeautify', 'xcbeautify --quieter', 'xcpretty', 'xcpretty -test'). Use empty string (ex: '') to disable any formatter (More information: https://docs.fastlane.tools/best-practices/xcodebuild-formatters/)
|
105
|
+
var xcodebuildFormatter: String { get }
|
106
|
+
|
107
|
+
/// Remove retry attempts from test results table and the JUnit report (if not using xcpretty)
|
108
|
+
var outputRemoveRetryAttempts: Bool { get }
|
109
|
+
|
110
|
+
/// **DEPRECATED!** Use `output_style: 'raw'` instead - Disable xcpretty formatting of build, similar to `output_style='raw'` but this will also skip the test results table
|
111
|
+
var disableXcpretty: Bool? { get }
|
112
|
+
|
113
|
+
/// **DEPRECATED!** Use 'xcpretty_formatter' instead - A custom xcpretty formatter to use
|
108
114
|
var formatter: String? { get }
|
109
115
|
|
116
|
+
/// A custom xcpretty formatter to use
|
117
|
+
var xcprettyFormatter: String? { get }
|
118
|
+
|
110
119
|
/// Pass in xcpretty additional command line arguments (e.g. '--test --no-color' or '--tap --no-utf')
|
111
120
|
var xcprettyArgs: String? { get }
|
112
121
|
|
@@ -119,12 +128,18 @@ public protocol ScanfileProtocol: class {
|
|
119
128
|
/// Should provide additional copy of .xctestrun file (settings.xctestrun) and place in output path?
|
120
129
|
var outputXctestrun: Bool { get }
|
121
130
|
|
131
|
+
/// Custom path for the result bundle, overrides result_bundle
|
132
|
+
var resultBundlePath: String? { get }
|
133
|
+
|
122
134
|
/// Should an Xcode result bundle be generated in the output directory
|
123
135
|
var resultBundle: Bool { get }
|
124
136
|
|
125
137
|
/// Generate the json compilation database with clang naming convention (compile_commands.json)
|
126
138
|
var useClangReportName: Bool { get }
|
127
139
|
|
140
|
+
/// Optionally override the per-target setting in the scheme for running tests in parallel. Equivalent to -parallel-testing-enabled
|
141
|
+
var parallelTesting: Bool? { get }
|
142
|
+
|
128
143
|
/// Specify the exact number of test runners that will be spawned during parallel testing. Equivalent to -parallel-testing-worker-count
|
129
144
|
var concurrentWorkers: Int? { get }
|
130
145
|
|
@@ -191,6 +206,9 @@ public protocol ScanfileProtocol: class {
|
|
191
206
|
/// Use only if you're a pro, use the other options instead
|
192
207
|
var destination: String? { get }
|
193
208
|
|
209
|
+
/// Adds arch=x86_64 to the xcodebuild 'destination' argument to run simulator in a Rosetta mode
|
210
|
+
var runRosettaSimulator: Bool { get }
|
211
|
+
|
194
212
|
/// Platform to build when using a Catalyst enabled app. Valid values are: ios, macos
|
195
213
|
var catalystPlatform: String? { get }
|
196
214
|
|
@@ -212,7 +230,7 @@ public protocol ScanfileProtocol: class {
|
|
212
230
|
/// Lets xcodebuild use system's scm configuration
|
213
231
|
var useSystemScm: Bool { get }
|
214
232
|
|
215
|
-
/// The number of times a test can fail
|
233
|
+
/// The number of times a test can fail
|
216
234
|
var numberOfRetries: Int { get }
|
217
235
|
|
218
236
|
/// Should this step stop the build if the tests fail? Set this to false if you're using trainer
|
@@ -246,7 +264,6 @@ public extension ScanfileProtocol {
|
|
246
264
|
var addressSanitizer: Bool? { return nil }
|
247
265
|
var threadSanitizer: Bool? { return nil }
|
248
266
|
var openReport: Bool { return false }
|
249
|
-
var disableXcpretty: Bool? { return nil }
|
250
267
|
var outputDirectory: String { return "./test_output" }
|
251
268
|
var outputStyle: String? { return nil }
|
252
269
|
var outputTypes: String { return "html,junit" }
|
@@ -254,13 +271,19 @@ public extension ScanfileProtocol {
|
|
254
271
|
var buildlogPath: String { return "~/Library/Logs/scan" }
|
255
272
|
var includeSimulatorLogs: Bool { return false }
|
256
273
|
var suppressXcodeOutput: Bool? { return nil }
|
274
|
+
var xcodebuildFormatter: String { return "xcbeautify" }
|
275
|
+
var outputRemoveRetryAttempts: Bool { return false }
|
276
|
+
var disableXcpretty: Bool? { return nil }
|
257
277
|
var formatter: String? { return nil }
|
278
|
+
var xcprettyFormatter: String? { return nil }
|
258
279
|
var xcprettyArgs: String? { return nil }
|
259
280
|
var derivedDataPath: String? { return nil }
|
260
281
|
var shouldZipBuildProducts: Bool { return false }
|
261
282
|
var outputXctestrun: Bool { return false }
|
283
|
+
var resultBundlePath: String? { return nil }
|
262
284
|
var resultBundle: Bool { return false }
|
263
285
|
var useClangReportName: Bool { return false }
|
286
|
+
var parallelTesting: Bool? { return nil }
|
264
287
|
var concurrentWorkers: Int? { return nil }
|
265
288
|
var maxConcurrentSimulators: Int? { return nil }
|
266
289
|
var disableConcurrentTesting: Bool { return false }
|
@@ -283,6 +306,7 @@ public extension ScanfileProtocol {
|
|
283
306
|
var slackOnlyOnFailure: Bool { return false }
|
284
307
|
var slackDefaultPayloads: [String]? { return nil }
|
285
308
|
var destination: String? { return nil }
|
309
|
+
var runRosettaSimulator: Bool { return false }
|
286
310
|
var catalystPlatform: String? { return nil }
|
287
311
|
var customReportFileName: String? { return nil }
|
288
312
|
var xcodebuildCommand: String { return "env NSUnbufferedIO=YES xcodebuild" }
|
@@ -296,4 +320,4 @@ public extension ScanfileProtocol {
|
|
296
320
|
|
297
321
|
// Please don't remove the lines below
|
298
322
|
// They are used to detect outdated files
|
299
|
-
// FastlaneRunnerAPIVersion [0.9.
|
323
|
+
// FastlaneRunnerAPIVersion [0.9.124]
|
@@ -1,5 +1,5 @@
|
|
1
1
|
// Screengrabfile.swift
|
2
|
-
// Copyright (c)
|
2
|
+
// Copyright (c) 2023 FastlaneTools
|
3
3
|
|
4
4
|
// This class is automatically included in FastlaneRunner during build
|
5
5
|
|
@@ -17,4 +17,4 @@ public class Screengrabfile: ScreengrabfileProtocol {
|
|
17
17
|
// during the `init` process, and you won't see this message
|
18
18
|
}
|
19
19
|
|
20
|
-
// Generated with fastlane 2.
|
20
|
+
// Generated with fastlane 2.213.0
|
@@ -1,7 +1,7 @@
|
|
1
1
|
// ScreengrabfileProtocol.swift
|
2
|
-
// Copyright (c)
|
2
|
+
// Copyright (c) 2023 FastlaneTools
|
3
3
|
|
4
|
-
public protocol ScreengrabfileProtocol:
|
4
|
+
public protocol ScreengrabfileProtocol: AnyObject {
|
5
5
|
/// Path to the root of your Android SDK installation, e.g. ~/tools/android-sdk-macosx
|
6
6
|
var androidHome: String? { get }
|
7
7
|
|
@@ -47,7 +47,7 @@ public protocol ScreengrabfileProtocol: class {
|
|
47
47
|
/// The path to the APK for the app under test
|
48
48
|
var appApkPath: String? { get }
|
49
49
|
|
50
|
-
/// The path to the APK for the
|
50
|
+
/// The path to the APK for the tests bundle
|
51
51
|
var testsApkPath: String? { get }
|
52
52
|
|
53
53
|
/// Use the device or emulator with the given serial number or qualifier
|
@@ -56,7 +56,7 @@ public protocol ScreengrabfileProtocol: class {
|
|
56
56
|
/// Type of device used for screenshots. Matches Google Play Types (phone, sevenInch, tenInch, tv, wear)
|
57
57
|
var deviceType: String { get }
|
58
58
|
|
59
|
-
/// Whether or not to exit Screengrab on test failure. Exiting on failure will not copy
|
59
|
+
/// Whether or not to exit Screengrab on test failure. Exiting on failure will not copy screenshots to local machine nor open screenshots summary
|
60
60
|
var exitOnTestFailure: Bool { get }
|
61
61
|
|
62
62
|
/// Enabling this option will automatically uninstall the application before running it
|
@@ -96,4 +96,4 @@ public extension ScreengrabfileProtocol {
|
|
96
96
|
|
97
97
|
// Please don't remove the lines below
|
98
98
|
// They are used to detect outdated files
|
99
|
-
// FastlaneRunnerAPIVersion [0.9.
|
99
|
+
// FastlaneRunnerAPIVersion [0.9.114]
|
@@ -1,5 +1,5 @@
|
|
1
1
|
// Snapshotfile.swift
|
2
|
-
// Copyright (c)
|
2
|
+
// Copyright (c) 2023 FastlaneTools
|
3
3
|
|
4
4
|
// This class is automatically included in FastlaneRunner during build
|
5
5
|
|
@@ -17,4 +17,4 @@ public class Snapshotfile: SnapshotfileProtocol {
|
|
17
17
|
// during the `init` process, and you won't see this message
|
18
18
|
}
|
19
19
|
|
20
|
-
// Generated with fastlane 2.
|
20
|
+
// Generated with fastlane 2.213.0
|
@@ -1,7 +1,7 @@
|
|
1
1
|
// SnapshotfileProtocol.swift
|
2
|
-
// Copyright (c)
|
2
|
+
// Copyright (c) 2023 FastlaneTools
|
3
3
|
|
4
|
-
public protocol SnapshotfileProtocol:
|
4
|
+
public protocol SnapshotfileProtocol: AnyObject {
|
5
5
|
/// Path the workspace file
|
6
6
|
var workspace: String? { get }
|
7
7
|
|
@@ -53,7 +53,7 @@ public protocol SnapshotfileProtocol: class {
|
|
53
53
|
/// Enabling this option will automatically override the status bar to show 9:41 AM, full battery, and full reception (Adjust 'SNAPSHOT_SIMULATOR_WAIT_FOR_BOOT_TIMEOUT' environment variable if override status bar is not working. Might be because simulator is not fully booted. Defaults to 10 seconds)
|
54
54
|
var overrideStatusBar: Bool { get }
|
55
55
|
|
56
|
-
/// Fully customize the status bar by setting each option here. See `xcrun simctl status_bar --help`
|
56
|
+
/// Fully customize the status bar by setting each option here. Requires `override_status_bar` to be set to `true`. See `xcrun simctl status_bar --help`
|
57
57
|
var overrideStatusBarArguments: String? { get }
|
58
58
|
|
59
59
|
/// Enabling this option will configure the Simulator's system language
|
@@ -86,9 +86,6 @@ public protocol SnapshotfileProtocol: class {
|
|
86
86
|
/// The configuration to use when building the app. Defaults to 'Release'
|
87
87
|
var configuration: String? { get }
|
88
88
|
|
89
|
-
/// Additional xcpretty arguments
|
90
|
-
var xcprettyArgs: String? { get }
|
91
|
-
|
92
89
|
/// The SDK that should be used for building the application
|
93
90
|
var sdk: String? { get }
|
94
91
|
|
@@ -137,6 +134,12 @@ public protocol SnapshotfileProtocol: class {
|
|
137
134
|
/// Array of strings matching Test Bundle/Test Suite/Test Cases to skip
|
138
135
|
var skipTesting: String? { get }
|
139
136
|
|
137
|
+
/// xcodebuild formatter to use (ex: 'xcbeautify', 'xcbeautify --quieter', 'xcpretty', 'xcpretty -test'). Use empty string (ex: '') to disable any formatter (More information: https://docs.fastlane.tools/best-practices/xcodebuild-formatters/)
|
138
|
+
var xcodebuildFormatter: String { get }
|
139
|
+
|
140
|
+
/// **DEPRECATED!** Use `xcodebuild_formatter: ''` instead - Additional xcpretty arguments
|
141
|
+
var xcprettyArgs: String? { get }
|
142
|
+
|
140
143
|
/// Disable xcpretty formatting of build
|
141
144
|
var disableXcpretty: Bool? { get }
|
142
145
|
|
@@ -176,7 +179,6 @@ public extension SnapshotfileProtocol {
|
|
176
179
|
var clean: Bool { return false }
|
177
180
|
var testWithoutBuilding: Bool? { return nil }
|
178
181
|
var configuration: String? { return nil }
|
179
|
-
var xcprettyArgs: String? { return nil }
|
180
182
|
var sdk: String? { return nil }
|
181
183
|
var scheme: String? { return nil }
|
182
184
|
var numberOfRetries: Int { return 1 }
|
@@ -193,6 +195,8 @@ public extension SnapshotfileProtocol {
|
|
193
195
|
var testplan: String? { return nil }
|
194
196
|
var onlyTesting: String? { return nil }
|
195
197
|
var skipTesting: String? { return nil }
|
198
|
+
var xcodebuildFormatter: String { return "xcbeautify" }
|
199
|
+
var xcprettyArgs: String? { return nil }
|
196
200
|
var disableXcpretty: Bool? { return nil }
|
197
201
|
var suppressXcodeOutput: Bool? { return nil }
|
198
202
|
var useSystemScm: Bool { return false }
|
@@ -200,4 +204,4 @@ public extension SnapshotfileProtocol {
|
|
200
204
|
|
201
205
|
// Please don't remove the lines below
|
202
206
|
// They are used to detect outdated files
|
203
|
-
// FastlaneRunnerAPIVersion [0.9.
|
207
|
+
// FastlaneRunnerAPIVersion [0.9.108]
|
@@ -1,5 +1,5 @@
|
|
1
1
|
// SocketClient.swift
|
2
|
-
// Copyright (c)
|
2
|
+
// Copyright (c) 2023 FastlaneTools
|
3
3
|
|
4
4
|
//
|
5
5
|
// ** NOTE **
|
@@ -144,7 +144,11 @@ class SocketClient: NSObject {
|
|
144
144
|
|
145
145
|
private func sendThroughQueue(string: String) {
|
146
146
|
let data = string.data(using: .utf8)!
|
147
|
-
|
147
|
+
data.withUnsafeBytes { (buffer: UnsafeRawBufferPointer) in
|
148
|
+
if let buffer = buffer.baseAddress {
|
149
|
+
self.outputStream.write(buffer.assumingMemoryBound(to: UInt8.self), maxLength: data.count)
|
150
|
+
}
|
151
|
+
}
|
148
152
|
}
|
149
153
|
|
150
154
|
private func privateSend(string: String) {
|
@@ -202,7 +206,7 @@ class SocketClient: NSObject {
|
|
202
206
|
extension SocketClient: StreamDelegate {
|
203
207
|
func stream(_ aStream: Stream, handle eventCode: Stream.Event) {
|
204
208
|
guard !cleaningUpAfterDone else {
|
205
|
-
// Still getting response from server
|
209
|
+
// Still getting response from server even though we are done.
|
206
210
|
// No big deal, we're closing the streams anyway.
|
207
211
|
// That being said, we need to balance out the dispatchGroups
|
208
212
|
dispatchGroup.leave()
|
@@ -240,7 +244,7 @@ extension SocketClient: StreamDelegate {
|
|
240
244
|
|
241
245
|
case Stream.Event.errorOccurred:
|
242
246
|
// probably safe to close all the things because Ruby already disconnected
|
243
|
-
verbose(message: "output stream
|
247
|
+
verbose(message: "output stream received error")
|
244
248
|
|
245
249
|
case Stream.Event.endEncountered:
|
246
250
|
// nothing special here
|
@@ -306,7 +310,7 @@ extension SocketClient: StreamDelegate {
|
|
306
310
|
LaneFile.fastfileInstance?.onError(currentLane: ArgumentProcessor(args: CommandLine.arguments).currentLane, errorInfo: failureInformation.joined(), errorClass: failureClass, errorMessage: failureMessage)
|
307
311
|
socketDelegate?.commandExecuted(serverResponse: .serverError) {
|
308
312
|
$0.writeSemaphore.signal()
|
309
|
-
self.handleFailure(message: failureInformation)
|
313
|
+
self.handleFailure(message: failureMessage.map { m in [m] + failureInformation } ?? failureInformation)
|
310
314
|
}
|
311
315
|
|
312
316
|
case let .parseFailure(failureInformation):
|
@@ -1,5 +1,5 @@
|
|
1
1
|
// SocketClientDelegateProtocol.swift
|
2
|
-
// Copyright (c)
|
2
|
+
// Copyright (c) 2023 FastlaneTools
|
3
3
|
|
4
4
|
//
|
5
5
|
// ** NOTE **
|
@@ -10,7 +10,7 @@
|
|
10
10
|
|
11
11
|
import Foundation
|
12
12
|
|
13
|
-
protocol SocketClientDelegateProtocol:
|
13
|
+
protocol SocketClientDelegateProtocol: AnyObject {
|
14
14
|
func connectionsOpened()
|
15
15
|
func connectionsClosed()
|
16
16
|
func commandExecuted(serverResponse: SocketClientResponse, completion: (SocketClient) -> Void)
|
@@ -2,30 +2,45 @@
|
|
2
2
|
"entries": {
|
3
3
|
"brew": {
|
4
4
|
"swiftformat": {
|
5
|
-
"version": "0.
|
5
|
+
"version": "0.51.9",
|
6
6
|
"bottle": {
|
7
7
|
"rebuild": 0,
|
8
8
|
"root_url": "https://ghcr.io/v2/homebrew/core",
|
9
9
|
"files": {
|
10
|
+
"arm64_ventura": {
|
11
|
+
"cellar": ":any_skip_relocation",
|
12
|
+
"url": "https://ghcr.io/v2/homebrew/core/swiftformat/blobs/sha256:bbb01c5c7fcde4f8b17945c2c8386b099848c9cd4fda8bcfd032c2420d5d1b65",
|
13
|
+
"sha256": "bbb01c5c7fcde4f8b17945c2c8386b099848c9cd4fda8bcfd032c2420d5d1b65"
|
14
|
+
},
|
15
|
+
"arm64_monterey": {
|
16
|
+
"cellar": ":any_skip_relocation",
|
17
|
+
"url": "https://ghcr.io/v2/homebrew/core/swiftformat/blobs/sha256:f04596d4567e86f46e0740ea3e9d1e2e19fa1cdf137a70287342b6ce937ddf8d",
|
18
|
+
"sha256": "f04596d4567e86f46e0740ea3e9d1e2e19fa1cdf137a70287342b6ce937ddf8d"
|
19
|
+
},
|
10
20
|
"arm64_big_sur": {
|
11
21
|
"cellar": ":any_skip_relocation",
|
12
|
-
"url": "https://ghcr.io/v2/homebrew/core/swiftformat/blobs/sha256:
|
13
|
-
"sha256": "
|
22
|
+
"url": "https://ghcr.io/v2/homebrew/core/swiftformat/blobs/sha256:d8b6f0f30662dd4c2e1eb64d614fe2765ad664e2ac10a346004f94ed6ed6cdf2",
|
23
|
+
"sha256": "d8b6f0f30662dd4c2e1eb64d614fe2765ad664e2ac10a346004f94ed6ed6cdf2"
|
14
24
|
},
|
15
|
-
"
|
25
|
+
"ventura": {
|
16
26
|
"cellar": ":any_skip_relocation",
|
17
|
-
"url": "https://ghcr.io/v2/homebrew/core/swiftformat/blobs/sha256:
|
18
|
-
"sha256": "
|
27
|
+
"url": "https://ghcr.io/v2/homebrew/core/swiftformat/blobs/sha256:dc2be8c829dc26595577f8b5daa071324f341c4f144cc46bf0a47520d44fc76e",
|
28
|
+
"sha256": "dc2be8c829dc26595577f8b5daa071324f341c4f144cc46bf0a47520d44fc76e"
|
19
29
|
},
|
20
|
-
"
|
30
|
+
"monterey": {
|
21
31
|
"cellar": ":any_skip_relocation",
|
22
|
-
"url": "https://ghcr.io/v2/homebrew/core/swiftformat/blobs/sha256:
|
23
|
-
"sha256": "
|
32
|
+
"url": "https://ghcr.io/v2/homebrew/core/swiftformat/blobs/sha256:a88b992a2316fa06dd13944c6bb16d00522de0cc21aae17ede07e65d700c6800",
|
33
|
+
"sha256": "a88b992a2316fa06dd13944c6bb16d00522de0cc21aae17ede07e65d700c6800"
|
24
34
|
},
|
25
|
-
"
|
35
|
+
"big_sur": {
|
26
36
|
"cellar": ":any_skip_relocation",
|
27
|
-
"url": "https://ghcr.io/v2/homebrew/core/swiftformat/blobs/sha256:
|
28
|
-
"sha256": "
|
37
|
+
"url": "https://ghcr.io/v2/homebrew/core/swiftformat/blobs/sha256:ba2cf56b5845bb33265a3e32737c5defa6e310987f785e1dfe6e7dc114a12555",
|
38
|
+
"sha256": "ba2cf56b5845bb33265a3e32737c5defa6e310987f785e1dfe6e7dc114a12555"
|
39
|
+
},
|
40
|
+
"x86_64_linux": {
|
41
|
+
"cellar": "/home/linuxbrew/.linuxbrew/Cellar",
|
42
|
+
"url": "https://ghcr.io/v2/homebrew/core/swiftformat/blobs/sha256:d1f82ed96ee9f8f239e9396bff00a0feac937fe12840d05fb6d5c01fe9161f03",
|
43
|
+
"sha256": "d1f82ed96ee9f8f239e9396bff00a0feac937fe12840d05fb6d5c01fe9161f03"
|
29
44
|
}
|
30
45
|
}
|
31
46
|
}
|
@@ -43,20 +58,28 @@
|
|
43
58
|
"macOS": "10.15.7"
|
44
59
|
},
|
45
60
|
"big_sur": {
|
46
|
-
"HOMEBREW_VERSION": "3.
|
47
|
-
"HOMEBREW_PREFIX": "/
|
48
|
-
"Homebrew/homebrew-core": "
|
49
|
-
"CLT": "12.
|
50
|
-
"Xcode": "
|
51
|
-
"macOS": "11.
|
61
|
+
"HOMEBREW_VERSION": "3.3.9-34-g2e92128",
|
62
|
+
"HOMEBREW_PREFIX": "/usr/local",
|
63
|
+
"Homebrew/homebrew-core": "c28163ed56d6e54f2f71ecf678d4b4d33bac23a5",
|
64
|
+
"CLT": "12.4.0.0.1.1610135815",
|
65
|
+
"Xcode": "12.5",
|
66
|
+
"macOS": "11.0.1"
|
52
67
|
},
|
53
68
|
"monterey": {
|
54
|
-
"HOMEBREW_VERSION": "3.
|
55
|
-
"HOMEBREW_PREFIX": "/
|
56
|
-
"Homebrew/homebrew-core": "
|
57
|
-
"CLT": "13.
|
58
|
-
"Xcode": "13.
|
59
|
-
"macOS": "12.
|
69
|
+
"HOMEBREW_VERSION": "3.6.10-11-gb683beb",
|
70
|
+
"HOMEBREW_PREFIX": "/opt/homebrew",
|
71
|
+
"Homebrew/homebrew-core": "0bc04af3657134103a6f2b48b31e278e2537e85f",
|
72
|
+
"CLT": "13.4.0.0.1.1651278267",
|
73
|
+
"Xcode": "13.4.1",
|
74
|
+
"macOS": "12.5"
|
75
|
+
},
|
76
|
+
"ventura": {
|
77
|
+
"HOMEBREW_VERSION": "4.0.18-59-gf7b3225",
|
78
|
+
"HOMEBREW_PREFIX": "/opt/homebrew",
|
79
|
+
"Homebrew/homebrew-core": "api",
|
80
|
+
"CLT": "",
|
81
|
+
"Xcode": "14.1",
|
82
|
+
"macOS": "13.2.1"
|
60
83
|
}
|
61
84
|
}
|
62
85
|
}
|
data/fastlane/swift/main.swift
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"Actions.swift":"Autogenerated API","Fastlane.swift":"Autogenerated API","DeliverfileProtocol.swift":"Autogenerated API","GymfileProtocol.swift":"Autogenerated API","MatchfileProtocol.swift":"Autogenerated API","Plugins.swift":"Autogenerated API","PrecheckfileProtocol.swift":"Autogenerated API","ScanfileProtocol.swift":"Autogenerated API","ScreengrabfileProtocol.swift":"Autogenerated API","SnapshotfileProtocol.swift":"Autogenerated API","LaneFileProtocol.swift":"Fastfile Components","OptionalConfigValue.swift":"Fastfile Components","ControlCommand.swift":"Networking","RubyCommand.swift":"Networking","RubyCommandable.swift":"Networking","Runner.swift":"Networking","SocketClient.swift":"Networking","SocketClientDelegateProtocol.swift":"Networking","SocketResponse.swift":"Networking","main.swift":"Runner Code","ArgumentProcessor.swift":"Runner Code","RunnerArgument.swift":"Runner Code"}
|
1
|
+
{"Actions.swift":"Autogenerated API","Fastlane.swift":"Autogenerated API","DeliverfileProtocol.swift":"Autogenerated API","GymfileProtocol.swift":"Autogenerated API","MatchfileProtocol.swift":"Autogenerated API","Plugins.swift":"Autogenerated API","PrecheckfileProtocol.swift":"Autogenerated API","ScanfileProtocol.swift":"Autogenerated API","ScreengrabfileProtocol.swift":"Autogenerated API","SnapshotfileProtocol.swift":"Autogenerated API","LaneFileProtocol.swift":"Fastfile Components","OptionalConfigValue.swift":"Fastfile Components","Atomic.swift":"Networking","ControlCommand.swift":"Networking","RubyCommand.swift":"Networking","RubyCommandable.swift":"Networking","Runner.swift":"Networking","SocketClient.swift":"Networking","SocketClientDelegateProtocol.swift":"Networking","SocketResponse.swift":"Networking","main.swift":"Runner Code","ArgumentProcessor.swift":"Runner Code","RunnerArgument.swift":"Runner Code"}
|
data/fastlane_core/README.md
CHANGED
@@ -23,6 +23,7 @@ You can hide the inline changelog by setting the `FASTLANE_HIDE_CHANGELOG` envir
|
|
23
23
|
|
24
24
|
- To hide timestamps in each row, set the `FASTLANE_HIDE_TIMESTAMP` environment variable to true.
|
25
25
|
- To disable output formatting, set the `FASTLANE_DISABLE_OUTPUT_FORMAT` environment variable to true.
|
26
|
+
- To prevent _fastlane_ from printing the plugins table on every lane run, set the `FASTLANE_HIDE_PLUGINS_TABLE` environment variable to true.
|
26
27
|
|
27
28
|
## Interacting with the user
|
28
29
|
|
@@ -1,8 +1,38 @@
|
|
1
1
|
require 'tempfile'
|
2
2
|
require 'openssl'
|
3
3
|
|
4
|
+
require_relative 'features'
|
4
5
|
require_relative 'helper'
|
5
6
|
|
7
|
+
# WWDR Intermediate Certificates in https://www.apple.com/certificateauthority/
|
8
|
+
WWDRCA_CERTIFICATES = [
|
9
|
+
{
|
10
|
+
alias: 'G2',
|
11
|
+
sha256: '9ed4b3b88c6a339cf1387895bda9ca6ea31a6b5ce9edf7511845923b0c8ac94c',
|
12
|
+
url: 'https://www.apple.com/certificateauthority/AppleWWDRCAG2.cer'
|
13
|
+
},
|
14
|
+
{
|
15
|
+
alias: 'G3',
|
16
|
+
sha256: 'dcf21878c77f4198e4b4614f03d696d89c66c66008d4244e1b99161aac91601f',
|
17
|
+
url: 'https://www.apple.com/certificateauthority/AppleWWDRCAG3.cer'
|
18
|
+
},
|
19
|
+
{
|
20
|
+
alias: 'G4',
|
21
|
+
sha256: 'ea4757885538dd8cb59ff4556f676087d83c85e70902c122e42c0808b5bce14c',
|
22
|
+
url: 'https://www.apple.com/certificateauthority/AppleWWDRCAG4.cer'
|
23
|
+
},
|
24
|
+
{
|
25
|
+
alias: 'G5',
|
26
|
+
sha256: '53fd008278e5a595fe1e908ae9c5e5675f26243264a5a6438c023e3ce2870760',
|
27
|
+
url: 'https://www.apple.com/certificateauthority/AppleWWDRCAG5.cer'
|
28
|
+
},
|
29
|
+
{
|
30
|
+
alias: 'G6',
|
31
|
+
sha256: 'bdd4ed6e74691f0c2bfd01be0296197af1379e0418e2d300efa9c3bef642ca30',
|
32
|
+
url: 'https://www.apple.com/certificateauthority/AppleWWDRCAG6.cer'
|
33
|
+
}
|
34
|
+
]
|
35
|
+
|
6
36
|
module FastlaneCore
|
7
37
|
# This class checks if a specific certificate is installed on the current mac
|
8
38
|
class CertChecker
|
@@ -22,7 +52,7 @@ module FastlaneCore
|
|
22
52
|
end
|
23
53
|
|
24
54
|
def self.installed_identies(in_keychain: nil)
|
25
|
-
|
55
|
+
install_missing_wwdr_certificates
|
26
56
|
|
27
57
|
available = list_available_identities(in_keychain: in_keychain)
|
28
58
|
# Match for this text against word boundaries to avoid edge cases around multiples of 10 identities!
|
@@ -81,37 +111,64 @@ module FastlaneCore
|
|
81
111
|
`#{commands.join(' ')}`
|
82
112
|
end
|
83
113
|
|
84
|
-
def self.
|
85
|
-
certificate_name = "Apple Worldwide Developer Relations
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
114
|
+
def self.installed_wwdr_certificates
|
115
|
+
certificate_name = "Apple Worldwide Developer Relations"
|
116
|
+
|
117
|
+
# Find all installed WWDRCA certificates
|
118
|
+
installed_certs = []
|
119
|
+
Helper.backticks("security find-certificate -a -c '#{certificate_name}' -p #{wwdr_keychain.shellescape}")
|
120
|
+
.lines
|
121
|
+
.each do |line|
|
122
|
+
if line.start_with?('-----BEGIN CERTIFICATE-----')
|
123
|
+
installed_certs << line
|
124
|
+
else
|
125
|
+
installed_certs.last << line
|
126
|
+
end
|
127
|
+
end
|
128
|
+
|
129
|
+
# Get the alias (see `WWDRCA_CERTIFICATES`) of the installed WWDRCA certificates
|
130
|
+
installed_certs
|
131
|
+
.map do |pem|
|
132
|
+
sha256 = Digest::SHA256.hexdigest(OpenSSL::X509::Certificate.new(pem).to_der)
|
133
|
+
WWDRCA_CERTIFICATES.find { |c| c[:sha256].casecmp?(sha256) }&.fetch(:alias)
|
134
|
+
end
|
135
|
+
.compact
|
90
136
|
end
|
91
137
|
|
92
|
-
def self.
|
93
|
-
|
94
|
-
|
138
|
+
def self.install_missing_wwdr_certificates
|
139
|
+
# Install all Worldwide Developer Relations Intermediate Certificates listed here: https://www.apple.com/certificateauthority/
|
140
|
+
missing = WWDRCA_CERTIFICATES.map { |c| c[:alias] } - installed_wwdr_certificates
|
141
|
+
missing.each do |cert_alias|
|
142
|
+
install_wwdr_certificate(cert_alias)
|
143
|
+
end
|
144
|
+
missing.count
|
95
145
|
end
|
96
146
|
|
97
|
-
def self.install_wwdr_certificate(
|
147
|
+
def self.install_wwdr_certificate(cert_alias)
|
148
|
+
url = WWDRCA_CERTIFICATES.find { |c| c[:alias] == cert_alias }.fetch(:url)
|
98
149
|
file = Tempfile.new(File.basename(url))
|
99
150
|
filename = file.path
|
100
151
|
keychain = wwdr_keychain
|
101
152
|
keychain = "-k #{keychain.shellescape}" unless keychain.empty?
|
102
153
|
|
103
|
-
|
154
|
+
# Attempts to fix an issue installing WWDR cert tends to fail on CIs
|
155
|
+
# https://github.com/fastlane/fastlane/issues/20960
|
156
|
+
curl_extras = ""
|
157
|
+
if FastlaneCore::Feature.enabled?('FASTLANE_WWDR_USE_HTTP1_AND_RETRIES')
|
158
|
+
curl_extras = "--http1.1 --retry 3 --retry-all-errors "
|
159
|
+
end
|
104
160
|
|
105
|
-
import_command = "curl -f -o #{filename} #{url} && security import #{filename} #{keychain}"
|
161
|
+
import_command = "curl #{curl_extras}-f -o #{filename} #{url} && security import #{filename} #{keychain}"
|
106
162
|
UI.verbose("Installing WWDR Cert: #{import_command}")
|
107
163
|
|
108
|
-
|
164
|
+
require 'open3'
|
165
|
+
stdout, stderr, status = Open3.capture3(import_command)
|
109
166
|
if FastlaneCore::Globals.verbose?
|
110
167
|
UI.command_output(stdout)
|
111
168
|
UI.command_output(stderr)
|
112
169
|
end
|
113
170
|
|
114
|
-
unless
|
171
|
+
unless status.success?
|
115
172
|
UI.verbose("Failed to install WWDR Certificate, checking output to see why")
|
116
173
|
# Check the command output, WWDR might already exist
|
117
174
|
unless /The specified item already exists in the keychain./ =~ stderr
|
@@ -124,8 +181,8 @@ module FastlaneCore
|
|
124
181
|
|
125
182
|
def self.wwdr_keychain
|
126
183
|
priority = [
|
127
|
-
"security
|
128
|
-
"security
|
184
|
+
"security default-keychain -d user",
|
185
|
+
"security list-keychains -d user"
|
129
186
|
]
|
130
187
|
priority.each do |command|
|
131
188
|
keychains = Helper.backticks(command, print: FastlaneCore::Globals.verbose?).split("\n")
|
@@ -320,7 +320,11 @@ module FastlaneCore
|
|
320
320
|
UI.verbose("Uninstalling app '#{app_identifier}' from #{device_type}...")
|
321
321
|
|
322
322
|
UI.message("Launch Simulator #{device_type}")
|
323
|
-
Helper.
|
323
|
+
if FastlaneCore::Helper.xcode_at_least?("13")
|
324
|
+
Helper.backticks("open -a Simulator.app --args -CurrentDeviceUDID #{device_udid} &> /dev/null")
|
325
|
+
else
|
326
|
+
Helper.backticks("xcrun instruments -w #{device_udid} &> /dev/null")
|
327
|
+
end
|
324
328
|
|
325
329
|
UI.message("Uninstall application #{app_identifier}")
|
326
330
|
Helper.backticks("xcrun simctl uninstall #{device_udid} #{app_identifier} &> /dev/null")
|
@@ -73,12 +73,17 @@ module FastlaneCore
|
|
73
73
|
end
|
74
74
|
|
75
75
|
def self.fetch_info_plist_with_unzip(path)
|
76
|
-
|
76
|
+
entry, error, = Open3.capture3("unzip", "-Z", "-1", path, "*Payload/*.app/Info.plist")
|
77
|
+
|
78
|
+
# unzip can return multiple Info.plist files if is an embedded app bundle (a WatchKit app)
|
79
|
+
# - ContainsWatchApp/Payload/Sample.app/Watch/Sample WatchKit App.app/Info.plist
|
80
|
+
# - ContainsWatchApp/Payload/Sample.app/Info.plist
|
81
|
+
#
|
82
|
+
# we can determine the main Info.plist by the shortest path
|
83
|
+
entry = entry.lines.map(&:chomp).min_by(&:size)
|
84
|
+
|
77
85
|
UI.command_output(error) unless error.empty?
|
78
|
-
return nil if
|
79
|
-
entry = list.chomp.split("\n").find do |e|
|
80
|
-
File.fnmatch("**/Payload/*.app/Info.plist", e, File::FNM_PATHNAME)
|
81
|
-
end
|
86
|
+
return nil if entry.nil? || entry.empty?
|
82
87
|
data, error, = Open3.capture3("unzip", "-p", path, entry)
|
83
88
|
UI.command_output(error) unless error.empty?
|
84
89
|
return nil if data.empty?
|