fastlane 2.139.0 → 2.144.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 +85 -72
- data/cert/lib/cert/options.rb +12 -5
- data/cert/lib/cert/runner.rb +13 -0
- data/deliver/lib/deliver/options.rb +28 -2
- data/deliver/lib/deliver/runner.rb +13 -2
- data/fastlane/lib/fastlane/action.rb +1 -1
- data/fastlane/lib/fastlane/actions/.hockey.rb.swp +0 -0
- data/fastlane/lib/fastlane/actions/.slack.rb.swp +0 -0
- data/fastlane/lib/fastlane/actions/.update_project_provisioning.rb.swp +0 -0
- data/fastlane/lib/fastlane/actions/README.md +2 -0
- data/fastlane/lib/fastlane/actions/app_store_build_number.rb +13 -5
- data/fastlane/lib/fastlane/actions/automatic_code_signing.rb +7 -1
- data/fastlane/lib/fastlane/actions/build_app.rb +157 -6
- data/fastlane/lib/fastlane/actions/build_ios_app.rb +28 -132
- data/fastlane/lib/fastlane/actions/build_mac_app.rb +46 -0
- data/fastlane/lib/fastlane/actions/clean_build_artifacts.rb +3 -0
- data/fastlane/lib/fastlane/actions/cocoapods.rb +2 -2
- data/fastlane/lib/fastlane/actions/crashlytics.rb +14 -2
- data/fastlane/lib/fastlane/actions/create_pull_request.rb +29 -0
- data/fastlane/lib/fastlane/actions/docs/{build_ios_app.md → build_app.md} +1 -1
- data/fastlane/lib/fastlane/actions/docs/frame_screenshots.md +22 -6
- data/fastlane/lib/fastlane/actions/docs/sync_code_signing.md +22 -6
- data/fastlane/lib/fastlane/actions/ensure_git_branch.rb +1 -1
- data/fastlane/lib/fastlane/actions/ensure_xcode_version.rb +35 -7
- data/fastlane/lib/fastlane/actions/frame_screenshots.rb +2 -1
- data/fastlane/lib/fastlane/actions/get_github_release.rb +3 -0
- data/fastlane/lib/fastlane/actions/gradle.rb +43 -2
- data/fastlane/lib/fastlane/actions/gym.rb +3 -7
- data/fastlane/lib/fastlane/actions/import_from_git.rb +4 -0
- data/fastlane/lib/fastlane/actions/latest_testflight_build_number.rb +9 -3
- data/fastlane/lib/fastlane/actions/notarize.rb +183 -0
- data/fastlane/lib/fastlane/actions/pod_lib_lint.rb +7 -1
- data/fastlane/lib/fastlane/actions/run_tests.rb +5 -22
- data/fastlane/lib/fastlane/actions/s3.rb +5 -291
- data/fastlane/lib/fastlane/actions/set_github_release.rb +1 -1
- data/fastlane/lib/fastlane/actions/spm.rb +8 -0
- data/fastlane/lib/fastlane/actions/swiftlint.rb +45 -9
- data/fastlane/lib/fastlane/actions/update_code_signing_settings.rb +190 -0
- data/fastlane/lib/fastlane/actions/update_plist.rb +37 -2
- data/fastlane/lib/fastlane/actions/upload_symbols_to_crashlytics.rb +13 -3
- data/fastlane/lib/fastlane/actions/upload_to_app_store.rb +1 -0
- data/fastlane/lib/fastlane/fast_file.rb +13 -3
- data/fastlane/lib/fastlane/helper/adb_helper.rb +1 -1
- data/fastlane/lib/fastlane/helper/s3_client_helper.rb +56 -0
- data/fastlane/lib/fastlane/plugins/plugin_manager.rb +1 -1
- data/fastlane/lib/fastlane/plugins/template/.rubocop.yml +2 -0
- data/fastlane/lib/fastlane/runner.rb +23 -18
- data/fastlane/lib/fastlane/server/socket_server_action_command_executor.rb +1 -1
- data/fastlane/lib/fastlane/version.rb +1 -1
- data/fastlane/swift/Deliverfile.swift +1 -1
- data/fastlane/swift/DeliverfileProtocol.swift +3 -3
- data/fastlane/swift/Fastlane.swift +422 -45
- data/fastlane/swift/FastlaneSwiftRunner/FastlaneSwiftRunner.xcodeproj/project.xcworkspace/xcuserdata/josh.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
- data/fastlane/swift/Gymfile.swift +1 -1
- data/fastlane/swift/GymfileProtocol.swift +17 -1
- data/fastlane/swift/Matchfile.swift +1 -1
- data/fastlane/swift/MatchfileProtocol.swift +23 -3
- data/fastlane/swift/Precheckfile.swift +1 -1
- data/fastlane/swift/RubyCommand.swift +1 -1
- data/fastlane/swift/Scanfile.swift +1 -1
- data/fastlane/swift/ScanfileProtocol.swift +21 -1
- data/fastlane/swift/Screengrabfile.swift +1 -1
- data/fastlane/swift/Snapshotfile.swift +1 -1
- data/fastlane/swift/SnapshotfileProtocol.swift +9 -1
- data/fastlane_core/lib/fastlane_core/cert_checker.rb +28 -0
- data/fastlane_core/lib/fastlane_core/device_manager.rb +1 -1
- data/fastlane_core/lib/fastlane_core/ipa_file_analyser.rb +1 -0
- data/fastlane_core/lib/fastlane_core/keychain_importer.rb +2 -0
- data/fastlane_core/lib/fastlane_core/project.rb +27 -0
- data/fastlane_core/lib/fastlane_core/provisioning_profile.rb +15 -2
- data/frameit/lib/frameit/commands_generator.rb +25 -0
- data/frameit/lib/frameit/config_parser.rb +31 -9
- data/frameit/lib/frameit/device.rb +90 -0
- data/frameit/lib/frameit/device_types.rb +121 -5
- data/frameit/lib/frameit/editor.rb +28 -40
- data/frameit/lib/frameit/offsets.rb +8 -1
- data/frameit/lib/frameit/options.rb +81 -54
- data/frameit/lib/frameit/runner.rb +17 -7
- data/frameit/lib/frameit/screenshot.rb +35 -47
- data/frameit/lib/frameit/template_finder.rb +15 -12
- data/gym/lib/gym/code_signing_mapping.rb +32 -3
- data/gym/lib/gym/detect_values.rb +34 -2
- data/gym/lib/gym/generators/package_command_generator.rb +8 -0
- data/gym/lib/gym/generators/package_command_generator_xcode7.rb +52 -17
- data/gym/lib/gym/module.rb +8 -0
- data/gym/lib/gym/options.rb +25 -1
- data/gym/lib/gym/runner.rb +70 -21
- data/match/lib/match/change_password.rb +1 -1
- data/match/lib/match/encryption.rb +4 -0
- data/match/lib/match/encryption/openssl.rb +1 -1
- data/match/lib/match/generator.rb +17 -3
- data/match/lib/match/importer.rb +35 -20
- data/match/lib/match/module.rb +5 -2
- data/match/lib/match/nuke.rb +59 -17
- data/match/lib/match/options.rb +38 -15
- data/match/lib/match/runner.rb +24 -8
- data/match/lib/match/setup.rb +1 -1
- data/match/lib/match/spaceship_ensure.rb +19 -9
- data/match/lib/match/storage.rb +4 -0
- data/match/lib/match/storage/git_storage.rb +5 -2
- data/match/lib/match/storage/google_cloud_storage.rb +2 -2
- data/match/lib/match/storage/s3_storage.rb +162 -0
- data/pilot/lib/pilot/.manager.rb.swp +0 -0
- data/pilot/lib/pilot/build_manager.rb +24 -9
- data/scan/lib/scan/detect_values.rb +6 -1
- data/scan/lib/scan/manager.rb +18 -1
- data/scan/lib/scan/options.rb +28 -1
- data/scan/lib/scan/runner.rb +9 -7
- data/scan/lib/scan/slack_poster.rb +1 -1
- data/scan/lib/scan/test_command_generator.rb +12 -5
- data/screengrab/lib/screengrab/runner.rb +31 -18
- data/sigh/lib/sigh/.runner.rb.swp +0 -0
- data/snapshot/lib/snapshot/fixes/simulator_shared_pasteboard.rb +16 -0
- data/snapshot/lib/snapshot/options.rb +12 -1
- data/snapshot/lib/snapshot/simulator_launchers/launcher_configuration.rb +2 -0
- data/snapshot/lib/snapshot/simulator_launchers/simulator_launcher_base.rb +13 -0
- data/spaceship/lib/spaceship/connect_api/.DS_Store +0 -0
- data/spaceship/lib/spaceship/connect_api/models/.bundle_id.rb.swp +0 -0
- data/{gym/lib/gym/.runner.rb.swp → spaceship/lib/spaceship/connect_api/models/.bundle_id_capability.rb.swp} +0 -0
- data/spaceship/lib/spaceship/connect_api/models/app.rb +11 -0
- data/spaceship/lib/spaceship/connect_api/models/beta_feedback.rb +4 -0
- data/spaceship/lib/spaceship/connect_api/models/build.rb +1 -2
- data/spaceship/lib/spaceship/connect_api/models/certificate.rb +2 -0
- data/spaceship/lib/spaceship/connect_api/testflight/testflight.rb +29 -0
- data/spaceship/lib/spaceship/portal/app.rb +11 -2
- data/spaceship/lib/spaceship/tunes/app_version.rb +6 -1
- data/spaceship/lib/spaceship/tunes/iap.rb +11 -11
- data/spaceship/lib/spaceship/tunes/iap_detail.rb +7 -3
- data/spaceship/lib/spaceship/tunes/iap_families.rb +12 -1
- data/spaceship/lib/spaceship/tunes/iap_family_details.rb +26 -17
- data/spaceship/lib/spaceship/tunes/iap_status.rb +5 -1
- data/spaceship/lib/spaceship/tunes/tunes_client.rb +2 -2
- data/supply/lib/supply/client.rb +1 -1
- metadata +63 -18
@@ -44,7 +44,7 @@ module Scan
|
|
44
44
|
end
|
45
45
|
|
46
46
|
Fastlane::Actions::SlackAction.run({
|
47
|
-
message: "#{Scan.project.app_name} Tests:\n#{Scan.config[:slack_message]}",
|
47
|
+
message: "#{Scan.config[:app_name] || Scan.project.app_name} Tests:\n#{Scan.config[:slack_message]}",
|
48
48
|
channel: channel,
|
49
49
|
slack_url: Scan.config[:slack_url].to_s,
|
50
50
|
success: results[:build_errors].to_i == 0 && results[:failures].to_i == 0,
|
@@ -27,7 +27,7 @@ module Scan
|
|
27
27
|
UI.user_error!("No project/workspace found")
|
28
28
|
end
|
29
29
|
|
30
|
-
def options
|
30
|
+
def options # rubocop:disable Metrics/PerceivedComplexity
|
31
31
|
config = Scan.config
|
32
32
|
|
33
33
|
options = []
|
@@ -37,11 +37,17 @@ module Scan
|
|
37
37
|
options << "-toolchain '#{config[:toolchain]}'" if config[:toolchain]
|
38
38
|
options << "-derivedDataPath '#{config[:derived_data_path]}'" if config[:derived_data_path]
|
39
39
|
options << "-resultBundlePath '#{result_bundle_path}'" if config[:result_bundle]
|
40
|
-
options << "-
|
41
|
-
|
40
|
+
options << "-parallel-testing-worker-count #{config[:concurrent_workers]}" if config[:concurrent_workers]
|
41
|
+
if FastlaneCore::Helper.xcode_at_least?(10)
|
42
|
+
options << "-maximum-concurrent-test-simulator-destinations #{config[:max_concurrent_simulators]}" if config[:max_concurrent_simulators]
|
43
|
+
options << "-disable-concurrent-testing" if config[:disable_concurrent_testing]
|
44
|
+
end
|
42
45
|
options << "-enableCodeCoverage #{config[:code_coverage] ? 'YES' : 'NO'}" unless config[:code_coverage].nil?
|
43
46
|
options << "-enableAddressSanitizer #{config[:address_sanitizer] ? 'YES' : 'NO'}" unless config[:address_sanitizer].nil?
|
44
47
|
options << "-enableThreadSanitizer #{config[:thread_sanitizer] ? 'YES' : 'NO'}" unless config[:thread_sanitizer].nil?
|
48
|
+
if FastlaneCore::Helper.xcode_at_least?(11)
|
49
|
+
options << "-testPlan #{config[:testplan]}" if config[:testplan]
|
50
|
+
end
|
45
51
|
options << "-xctestrun '#{config[:xctestrun]}'" if config[:xctestrun]
|
46
52
|
options << config[:xcargs] if config[:xcargs]
|
47
53
|
|
@@ -120,7 +126,7 @@ module Scan
|
|
120
126
|
|
121
127
|
# Store the raw file
|
122
128
|
def xcodebuild_log_path
|
123
|
-
file_name = "#{Scan.project.app_name}-#{Scan.config[:scheme]}.log"
|
129
|
+
file_name = "#{Scan.config[:app_name] || Scan.project.app_name}-#{Scan.config[:scheme]}.log"
|
124
130
|
containing = File.expand_path(Scan.config[:buildlog_path])
|
125
131
|
FileUtils.mkdir_p(containing)
|
126
132
|
|
@@ -148,7 +154,8 @@ module Scan
|
|
148
154
|
|
149
155
|
def result_bundle_path
|
150
156
|
unless Scan.cache[:result_bundle_path]
|
151
|
-
|
157
|
+
ext = FastlaneCore::Helper.xcode_version.to_i >= 11 ? '.xcresult' : '.test_result'
|
158
|
+
path = File.join(Scan.config[:output_directory], Scan.config[:scheme]) + ext
|
152
159
|
if File.directory?(path)
|
153
160
|
FileUtils.remove_dir(path)
|
154
161
|
end
|
@@ -73,15 +73,11 @@ module Screengrab
|
|
73
73
|
|
74
74
|
validate_apk(app_apk_path)
|
75
75
|
|
76
|
-
|
77
|
-
|
78
|
-
run_tests(device_serial, app_apk_path, tests_apk_path, test_classes_to_use, test_packages_to_use, @config[:launch_arguments])
|
79
|
-
|
80
|
-
number_of_screenshots = pull_screenshots_from_device(device_serial, device_screenshots_paths, device_type_dir_name)
|
76
|
+
number_of_screenshots = run_tests(device_type_dir_name, device_screenshots_paths, device_serial, app_apk_path, tests_apk_path, test_classes_to_use, test_packages_to_use, @config[:launch_arguments])
|
81
77
|
|
82
78
|
ReportsGenerator.new.generate
|
83
79
|
|
84
|
-
UI.success("Captured #{number_of_screenshots} screenshots! 📷✨")
|
80
|
+
UI.success("Captured #{number_of_screenshots} new screenshots! 📷✨")
|
85
81
|
end
|
86
82
|
|
87
83
|
def select_device
|
@@ -147,10 +143,17 @@ module Screengrab
|
|
147
143
|
|
148
144
|
def determine_internal_screenshots_paths(app_package_name, locales)
|
149
145
|
locale_paths = locales.map do |locale|
|
150
|
-
|
151
|
-
|
146
|
+
[
|
147
|
+
"/data/user/0/#{app_package_name}/files/#{app_package_name}/screengrab/#{locale}/images/screenshots",
|
148
|
+
|
149
|
+
# https://github.com/fastlane/fastlane/issues/15653#issuecomment-578541663
|
150
|
+
"/data/data/#{app_package_name}/files/#{app_package_name}/screengrab/#{locale}/images/screenshots"
|
151
|
+
]
|
152
|
+
end.flatten
|
152
153
|
|
153
|
-
return ["/data/data/#{app_package_name}/app_screengrab"] +
|
154
|
+
return ["/data/data/#{app_package_name}/app_screengrab"] +
|
155
|
+
["/data/data/#{app_package_name}/screengrab"] +
|
156
|
+
locale_paths
|
154
157
|
end
|
155
158
|
|
156
159
|
def clear_device_previous_screenshots(device_serial, device_screenshots_paths)
|
@@ -232,23 +235,29 @@ module Screengrab
|
|
232
235
|
end
|
233
236
|
end
|
234
237
|
|
235
|
-
def run_tests(device_serial, app_apk_path, tests_apk_path, test_classes_to_use, test_packages_to_use, launch_arguments)
|
238
|
+
def run_tests(device_type_dir_name, device_screenshots_paths, device_serial, app_apk_path, tests_apk_path, test_classes_to_use, test_packages_to_use, launch_arguments)
|
236
239
|
unless @config[:reinstall_app]
|
237
240
|
install_apks(device_serial, app_apk_path, tests_apk_path)
|
238
241
|
grant_permissions(device_serial)
|
242
|
+
enable_clean_status_bar(device_serial, app_apk_path)
|
239
243
|
end
|
240
244
|
|
245
|
+
number_of_screenshots = 0
|
246
|
+
|
241
247
|
@config[:locales].each do |locale|
|
242
248
|
if @config[:reinstall_app]
|
243
249
|
uninstall_apks(device_serial, @config[:app_package_name], @config[:tests_package_name])
|
244
250
|
install_apks(device_serial, app_apk_path, tests_apk_path)
|
245
251
|
grant_permissions(device_serial)
|
252
|
+
enable_clean_status_bar(device_serial, app_apk_path)
|
246
253
|
end
|
247
|
-
run_tests_for_locale(locale, device_serial, test_classes_to_use, test_packages_to_use, launch_arguments)
|
254
|
+
number_of_screenshots += run_tests_for_locale(device_type_dir_name, device_screenshots_paths, locale, device_serial, test_classes_to_use, test_packages_to_use, launch_arguments)
|
248
255
|
end
|
256
|
+
|
257
|
+
number_of_screenshots
|
249
258
|
end
|
250
259
|
|
251
|
-
def run_tests_for_locale(locale, device_serial, test_classes_to_use, test_packages_to_use, launch_arguments)
|
260
|
+
def run_tests_for_locale(device_type_dir_name, device_screenshots_paths, locale, device_serial, test_classes_to_use, test_packages_to_use, launch_arguments)
|
252
261
|
UI.message("Running tests for locale: #{locale}")
|
253
262
|
|
254
263
|
instrument_command = ["-s #{device_serial} shell am instrument --no-window-animation -w",
|
@@ -271,10 +280,12 @@ module Screengrab
|
|
271
280
|
UI.error("Tests failed")
|
272
281
|
end
|
273
282
|
end
|
283
|
+
|
284
|
+
pull_screenshots_from_device(locale, device_serial, device_screenshots_paths, device_type_dir_name)
|
274
285
|
end
|
275
286
|
|
276
|
-
def pull_screenshots_from_device(device_serial, device_screenshots_paths, device_type_dir_name)
|
277
|
-
UI.message("Pulling captured screenshots from the device")
|
287
|
+
def pull_screenshots_from_device(locale, device_serial, device_screenshots_paths, device_type_dir_name)
|
288
|
+
UI.message("Pulling captured screenshots for locale #{locale} from the device")
|
278
289
|
starting_screenshot_count = screenshot_file_names_in(@config[:output_directory], device_type_dir_name).length
|
279
290
|
|
280
291
|
UI.verbose("Starting screenshot count is: #{starting_screenshot_count}")
|
@@ -285,6 +296,7 @@ module Screengrab
|
|
285
296
|
Dir.mktmpdir do |tempdir|
|
286
297
|
device_screenshots_paths.each do |device_path|
|
287
298
|
if_device_path_exists(device_serial, device_path) do |path|
|
299
|
+
next unless path.include?(locale)
|
288
300
|
run_adb_command("-s #{device_serial} pull #{path} #{tempdir}",
|
289
301
|
print_all: false,
|
290
302
|
print_command: true)
|
@@ -296,7 +308,7 @@ module Screengrab
|
|
296
308
|
#
|
297
309
|
# Therefore, we'll move the pulled screenshots from their genericly named folder to one named by the
|
298
310
|
# user provided device_type option value to match the directory structure that supply expects
|
299
|
-
move_pulled_screenshots(tempdir, device_type_dir_name)
|
311
|
+
move_pulled_screenshots(locale, tempdir, device_type_dir_name)
|
300
312
|
end
|
301
313
|
|
302
314
|
ending_screenshot_count = screenshot_file_names_in(@config[:output_directory], device_type_dir_name).length
|
@@ -305,7 +317,8 @@ module Screengrab
|
|
305
317
|
|
306
318
|
# Because we can't guarantee the screenshot output directory will be empty when we pull, we determine
|
307
319
|
# success based on whether there are more screenshots there than when we started.
|
308
|
-
|
320
|
+
# This is only applicable though when `clear_previous_screenshots` is set to `true`.
|
321
|
+
if starting_screenshot_count == ending_screenshot_count && @config[:clear_previous_screenshots]
|
309
322
|
UI.error("Make sure you've used Screengrab.screenshot() in your tests and that your expected tests are being run.")
|
310
323
|
UI.abort_with_message!("No screenshots were detected 📷❌")
|
311
324
|
end
|
@@ -313,7 +326,7 @@ module Screengrab
|
|
313
326
|
ending_screenshot_count - starting_screenshot_count
|
314
327
|
end
|
315
328
|
|
316
|
-
def move_pulled_screenshots(pull_dir, device_type_dir_name)
|
329
|
+
def move_pulled_screenshots(locale, pull_dir, device_type_dir_name)
|
317
330
|
# Glob pattern that finds the pulled screenshots directory for each locale
|
318
331
|
# Possible matches:
|
319
332
|
# [pull_dir]/en-US/images/screenshots
|
@@ -337,7 +350,7 @@ module Screengrab
|
|
337
350
|
# specific name, as expected by supply
|
338
351
|
#
|
339
352
|
# (Moved to: fastlane/metadata/android/en-US/images/phoneScreenshots)
|
340
|
-
dest_dir = File.join(File.dirname(dest_dir), device_type_dir_name)
|
353
|
+
dest_dir = File.join(File.dirname(dest_dir), locale, 'images', device_type_dir_name)
|
341
354
|
|
342
355
|
FileUtils.mkdir_p(dest_dir)
|
343
356
|
FileUtils.cp_r(src_screenshots, dest_dir)
|
Binary file
|
@@ -0,0 +1,16 @@
|
|
1
|
+
require_relative '../module'
|
2
|
+
|
3
|
+
module Snapshot
|
4
|
+
module Fixes
|
5
|
+
# Becoming first responder can trigger Pasteboard sync, which can stall and crash the simulator
|
6
|
+
# See https://twitter.com/steipete/status/1227551552317140992
|
7
|
+
|
8
|
+
class SharedPasteboardFix
|
9
|
+
def self.patch
|
10
|
+
UI.verbose("Patching simulator to disable Pasteboard automatic sync")
|
11
|
+
|
12
|
+
Helper.backticks("defaults write com.apple.iphonesimulator PasteboardAutomaticSync -bool false", print: FastlaneCore::Globals.verbose?)
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
@@ -221,7 +221,18 @@ module Snapshot
|
|
221
221
|
env_name: "SNAPSHOT_EXECUTE_CONCURRENT_SIMULATORS",
|
222
222
|
description: "Take snapshots on multiple simulators concurrently. Note: This option is only applicable when running against Xcode 9",
|
223
223
|
default_value: true,
|
224
|
-
is_string: false)
|
224
|
+
is_string: false),
|
225
|
+
FastlaneCore::ConfigItem.new(key: :disable_slide_to_type,
|
226
|
+
env_name: "SNAPSHOT_DISABLE_SLIDE_TO_TYPE",
|
227
|
+
description: "Disable the simulator from showing the 'Slide to type' prompt",
|
228
|
+
default_value: false,
|
229
|
+
optional: true,
|
230
|
+
is_string: false),
|
231
|
+
FastlaneCore::ConfigItem.new(key: :cloned_source_packages_path,
|
232
|
+
env_name: "SNAPSHOT_CLONED_SOURCE_PACKAGES_PATH",
|
233
|
+
description: "Sets a custom path for Swift Package Manager dependencies",
|
234
|
+
type: String,
|
235
|
+
optional: true)
|
225
236
|
]
|
226
237
|
end
|
227
238
|
end
|
@@ -11,6 +11,7 @@ module Snapshot
|
|
11
11
|
attr_accessor :dark_mode
|
12
12
|
attr_accessor :reinstall_app
|
13
13
|
attr_accessor :app_identifier
|
14
|
+
attr_accessor :disable_slide_to_type
|
14
15
|
|
15
16
|
# xcode 8
|
16
17
|
attr_accessor :number_of_retries
|
@@ -41,6 +42,7 @@ module Snapshot
|
|
41
42
|
@output_simulator_logs = snapshot_config[:output_simulator_logs]
|
42
43
|
@output_directory = snapshot_config[:output_directory]
|
43
44
|
@concurrent_simulators = snapshot_config[:concurrent_simulators]
|
45
|
+
@disable_slide_to_type = snapshot_config[:disable_slide_to_type]
|
44
46
|
|
45
47
|
launch_arguments = Array(snapshot_config[:launch_arguments])
|
46
48
|
# if more than 1 set of arguments, use a tuple with an index
|
@@ -5,6 +5,7 @@ require_relative '../test_command_generator'
|
|
5
5
|
require_relative '../collector'
|
6
6
|
require_relative '../fixes/hardware_keyboard_fix'
|
7
7
|
require_relative '../fixes/simulator_zoom_fix'
|
8
|
+
require_relative '../fixes/simulator_shared_pasteboard'
|
8
9
|
|
9
10
|
module Snapshot
|
10
11
|
class SimulatorLauncherBase
|
@@ -53,6 +54,7 @@ module Snapshot
|
|
53
54
|
|
54
55
|
Fixes::SimulatorZoomFix.patch
|
55
56
|
Fixes::HardwareKeyboardFix.patch
|
57
|
+
Fixes::SharedPasteboardFix.patch
|
56
58
|
|
57
59
|
device_types.each do |type|
|
58
60
|
if launcher_config.erase_simulator || launcher_config.localize_simulator || !launcher_config.dark_mode.nil?
|
@@ -67,6 +69,9 @@ module Snapshot
|
|
67
69
|
# no need to reinstall if device has been erased
|
68
70
|
uninstall_app(type)
|
69
71
|
end
|
72
|
+
if launcher_config.disable_slide_to_type
|
73
|
+
disable_slide_to_type(type)
|
74
|
+
end
|
70
75
|
end
|
71
76
|
end
|
72
77
|
|
@@ -139,6 +144,14 @@ module Snapshot
|
|
139
144
|
end
|
140
145
|
end
|
141
146
|
|
147
|
+
def disable_slide_to_type(device_type)
|
148
|
+
device_udid = TestCommandGenerator.device_udid(device_type)
|
149
|
+
if device_udid
|
150
|
+
UI.message("Disabling slide to type on #{device_type}")
|
151
|
+
FastlaneCore::Simulator.disable_slide_to_type(udid: device_udid)
|
152
|
+
end
|
153
|
+
end
|
154
|
+
|
142
155
|
def copy_simulator_logs(device_names, language, locale, launch_arguments)
|
143
156
|
return unless launcher_config.output_simulator_logs
|
144
157
|
|
Binary file
|
Binary file
|
Binary file
|
@@ -103,6 +103,17 @@ module Spaceship
|
|
103
103
|
resps = Spaceship::ConnectAPI.get_beta_groups(filter: filter, includes: includes, limit: limit, sort: sort).all_pages
|
104
104
|
return resps.flat_map(&:to_models)
|
105
105
|
end
|
106
|
+
|
107
|
+
def create_beta_group(group_name: nil, public_link_enabled: false, public_link_limit: 10_000, public_link_limit_enabled: false)
|
108
|
+
resps = Spaceship::ConnectAPI.create_beta_group(
|
109
|
+
app_id: id,
|
110
|
+
group_name: group_name,
|
111
|
+
public_link_enabled: public_link_enabled,
|
112
|
+
public_link_limit: public_link_limit,
|
113
|
+
public_link_limit_enabled: public_link_limit_enabled
|
114
|
+
).all_pages
|
115
|
+
return resps.flat_map(&:to_models).first
|
116
|
+
end
|
106
117
|
end
|
107
118
|
end
|
108
119
|
end
|
@@ -66,6 +66,10 @@ module Spaceship
|
|
66
66
|
def self.all(filter: {}, includes: "tester,build,screenshots", limit: nil, sort: nil)
|
67
67
|
return Spaceship::ConnectAPI.get_beta_feedback(filter: filter, includes: includes, limit: limit, sort: sort)
|
68
68
|
end
|
69
|
+
|
70
|
+
def delete!
|
71
|
+
return Spaceship::ConnectAPI.delete_beta_feedback(feedback_id: self.id)
|
72
|
+
end
|
69
73
|
end
|
70
74
|
end
|
71
75
|
end
|
@@ -79,8 +79,7 @@ module Spaceship
|
|
79
79
|
end
|
80
80
|
|
81
81
|
def ready_for_internal_testing?
|
82
|
-
|
83
|
-
return build_beta_detail.ready_for_internal_testing?
|
82
|
+
return build_beta_detail.nil? == false && build_beta_detail.ready_for_internal_testing?
|
84
83
|
end
|
85
84
|
|
86
85
|
def ready_for_beta_submission?
|
@@ -181,6 +181,29 @@ module Spaceship
|
|
181
181
|
Client.instance.post("builds/#{build_id}/relationships/betaGroups", body)
|
182
182
|
end
|
183
183
|
|
184
|
+
def create_beta_group(app_id: nil, group_name: nil, public_link_enabled: false, public_link_limit: 10_000, public_link_limit_enabled: false)
|
185
|
+
body = {
|
186
|
+
data: {
|
187
|
+
attributes: {
|
188
|
+
name: group_name,
|
189
|
+
publicLinkEnabled: public_link_enabled,
|
190
|
+
publicLinkLimit: public_link_limit,
|
191
|
+
publicLinkLimitEnabled: public_link_limit_enabled
|
192
|
+
},
|
193
|
+
relationships: {
|
194
|
+
app: {
|
195
|
+
data: {
|
196
|
+
id: app_id,
|
197
|
+
type: "apps"
|
198
|
+
}
|
199
|
+
}
|
200
|
+
},
|
201
|
+
type: "betaGroups"
|
202
|
+
}
|
203
|
+
}
|
204
|
+
Client.instance.post("betaGroups", body)
|
205
|
+
end
|
206
|
+
|
184
207
|
#
|
185
208
|
# betaTesters
|
186
209
|
#
|
@@ -326,6 +349,12 @@ module Spaceship
|
|
326
349
|
params = Client.instance.build_params(filter: filter, includes: includes, limit: limit, sort: sort)
|
327
350
|
Client.instance.get("betaFeedbacks", params)
|
328
351
|
end
|
352
|
+
|
353
|
+
def delete_beta_feedback(feedback_id: nil)
|
354
|
+
raise "Feedback id is nil" if feedback_id.nil?
|
355
|
+
|
356
|
+
Client.instance.delete("betaFeedbacks/#{feedback_id}")
|
357
|
+
end
|
329
358
|
end
|
330
359
|
end
|
331
360
|
end
|
@@ -108,9 +108,18 @@ module Spaceship
|
|
108
108
|
# @return (App) The app you're looking for. This is nil if the app can't be found.
|
109
109
|
def find(bundle_id, mac: false)
|
110
110
|
raise "`bundle_id` parameter must not be nil" if bundle_id.nil?
|
111
|
-
all(mac: mac).find do |app|
|
112
|
-
|
111
|
+
found_app = all(mac: mac).find do |app|
|
112
|
+
app if app.bundle_id.casecmp(bundle_id) == 0
|
113
113
|
end
|
114
|
+
|
115
|
+
# Find catalyst enabled mac apps (look for mac first and then iOS)
|
116
|
+
if !found_app && mac
|
117
|
+
found_app = all(mac: false).find do |app|
|
118
|
+
app if app.bundle_id.casecmp(bundle_id) == 0
|
119
|
+
end
|
120
|
+
end
|
121
|
+
|
122
|
+
found_app
|
114
123
|
end
|
115
124
|
end
|
116
125
|
|
@@ -767,14 +767,19 @@ module Spaceship
|
|
767
767
|
end
|
768
768
|
|
769
769
|
def setup_screenshots
|
770
|
-
# Enable Scaling for all screen sizes that don't have at least one screenshot
|
770
|
+
# Enable Scaling for all screen sizes that don't have at least one screenshot or at least one trailer (app_preview)
|
771
771
|
# We automatically disable scaling once we upload at least one screenshot
|
772
772
|
language_details = raw_data_details.each do |current_language|
|
773
773
|
language_details = (current_language["displayFamilies"] || {})["value"]
|
774
774
|
(language_details || []).each do |device_language_details|
|
775
|
+
# Do not enable scaling if a screenshot already exists
|
775
776
|
next if device_language_details["screenshots"].nil?
|
776
777
|
next if device_language_details["screenshots"]["value"].count > 0
|
777
778
|
|
779
|
+
# Do not enable scaling if a trailer already exists
|
780
|
+
next if device_language_details["trailers"].nil?
|
781
|
+
next if device_language_details["trailers"]["value"].count > 0
|
782
|
+
|
778
783
|
# The current row includes screenshots for all device types
|
779
784
|
# so we need to enable scaling for both iOS and watchOS apps
|
780
785
|
device_language_details["scaled"]["value"] = true if device_language_details["scaled"]
|
@@ -105,17 +105,6 @@ module Spaceship
|
|
105
105
|
end
|
106
106
|
end
|
107
107
|
|
108
|
-
# find a specific product
|
109
|
-
# @param product_id (String) Product Id
|
110
|
-
def find(product_id)
|
111
|
-
all.each do |product|
|
112
|
-
if product.product_id == product_id
|
113
|
-
return product
|
114
|
-
end
|
115
|
-
end
|
116
|
-
return nil
|
117
|
-
end
|
118
|
-
|
119
108
|
# return all available In-App-Purchase's of current app
|
120
109
|
# this is not paged inside iTC-API so if you have a lot if IAP's (2k+)
|
121
110
|
# it might take some time to load, same as it takes when you load the list via App Store Connect
|
@@ -132,6 +121,17 @@ module Spaceship
|
|
132
121
|
return_iaps
|
133
122
|
end
|
134
123
|
|
124
|
+
# find a specific product
|
125
|
+
# @param product_id (String) Product Id
|
126
|
+
def find(product_id)
|
127
|
+
all.each do |product|
|
128
|
+
if product.product_id == product_id
|
129
|
+
return product
|
130
|
+
end
|
131
|
+
end
|
132
|
+
return nil
|
133
|
+
end
|
134
|
+
|
135
135
|
private
|
136
136
|
|
137
137
|
def find_product_with_retries(product_id, max_tries)
|