fastlane 2.138.0 → 2.143.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (137) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE +1 -1
  3. data/README.md +75 -62
  4. data/cert/lib/cert/options.rb +12 -5
  5. data/cert/lib/cert/runner.rb +13 -0
  6. data/deliver/lib/deliver/options.rb +2 -2
  7. data/deliver/lib/deliver/runner.rb +13 -2
  8. data/deliver/lib/deliver/submit_for_review.rb +7 -1
  9. data/fastlane/lib/fastlane/action.rb +2 -2
  10. data/fastlane/lib/fastlane/actions/.hockey.rb.swp +0 -0
  11. data/fastlane/lib/fastlane/actions/.slack.rb.swp +0 -0
  12. data/fastlane/lib/fastlane/actions/.update_project_provisioning.rb.swp +0 -0
  13. data/fastlane/lib/fastlane/actions/README.md +2 -0
  14. data/fastlane/lib/fastlane/actions/app_store_build_number.rb +13 -5
  15. data/fastlane/lib/fastlane/actions/build_app.rb +157 -6
  16. data/fastlane/lib/fastlane/actions/build_ios_app.rb +28 -132
  17. data/fastlane/lib/fastlane/actions/build_mac_app.rb +46 -0
  18. data/fastlane/lib/fastlane/actions/cocoapods.rb +2 -2
  19. data/fastlane/lib/fastlane/actions/create_pull_request.rb +71 -2
  20. data/fastlane/lib/fastlane/actions/docs/{build_ios_app.md → build_app.md} +1 -1
  21. data/fastlane/lib/fastlane/actions/docs/frame_screenshots.md +22 -6
  22. data/fastlane/lib/fastlane/actions/docs/sync_code_signing.md +20 -4
  23. data/fastlane/lib/fastlane/actions/docs/upload_to_app_store.md.erb +10 -0
  24. data/fastlane/lib/fastlane/actions/ensure_git_branch.rb +1 -1
  25. data/fastlane/lib/fastlane/actions/ensure_xcode_version.rb +35 -7
  26. data/fastlane/lib/fastlane/actions/frame_screenshots.rb +2 -1
  27. data/fastlane/lib/fastlane/actions/get_github_release.rb +3 -0
  28. data/fastlane/lib/fastlane/actions/gradle.rb +43 -2
  29. data/fastlane/lib/fastlane/actions/gym.rb +3 -7
  30. data/fastlane/lib/fastlane/actions/import_from_git.rb +4 -0
  31. data/fastlane/lib/fastlane/actions/last_git_tag.rb +14 -5
  32. data/fastlane/lib/fastlane/actions/latest_testflight_build_number.rb +9 -3
  33. data/fastlane/lib/fastlane/actions/notarize.rb +183 -0
  34. data/fastlane/lib/fastlane/actions/run_tests.rb +5 -22
  35. data/fastlane/lib/fastlane/actions/s3.rb +5 -291
  36. data/fastlane/lib/fastlane/actions/set_github_release.rb +1 -1
  37. data/fastlane/lib/fastlane/actions/setup_ci.rb +14 -8
  38. data/fastlane/lib/fastlane/actions/spm.rb +8 -0
  39. data/fastlane/lib/fastlane/actions/swiftlint.rb +17 -2
  40. data/fastlane/lib/fastlane/actions/update_plist.rb +37 -2
  41. data/fastlane/lib/fastlane/actions/upload_symbols_to_crashlytics.rb +13 -3
  42. data/fastlane/lib/fastlane/actions/upload_to_app_store.rb +1 -0
  43. data/fastlane/lib/fastlane/actions/upload_to_play_store_internal_app_sharing.rb +78 -0
  44. data/fastlane/lib/fastlane/fast_file.rb +13 -3
  45. data/fastlane/lib/fastlane/helper/adb_helper.rb +1 -1
  46. data/fastlane/lib/fastlane/helper/s3_client_helper.rb +56 -0
  47. data/fastlane/lib/fastlane/plugins/plugin_manager.rb +1 -1
  48. data/fastlane/lib/fastlane/plugins/template/.rubocop.yml +2 -0
  49. data/fastlane/lib/fastlane/runner.rb +23 -18
  50. data/fastlane/lib/fastlane/server/socket_server_action_command_executor.rb +1 -1
  51. data/fastlane/lib/fastlane/version.rb +1 -1
  52. data/fastlane/swift/Deliverfile.swift +1 -1
  53. data/fastlane/swift/DeliverfileProtocol.swift +3 -3
  54. data/fastlane/swift/Fastlane.swift +429 -50
  55. data/fastlane/swift/FastlaneSwiftRunner/FastlaneSwiftRunner.xcodeproj/project.xcworkspace/xcuserdata/josh.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
  56. data/fastlane/swift/Gymfile.swift +1 -1
  57. data/fastlane/swift/GymfileProtocol.swift +17 -1
  58. data/fastlane/swift/Matchfile.swift +1 -1
  59. data/fastlane/swift/MatchfileProtocol.swift +23 -3
  60. data/fastlane/swift/Precheckfile.swift +1 -1
  61. data/fastlane/swift/RubyCommand.swift +1 -1
  62. data/fastlane/swift/Scanfile.swift +1 -1
  63. data/fastlane/swift/ScanfileProtocol.swift +21 -1
  64. data/fastlane/swift/Screengrabfile.swift +1 -1
  65. data/fastlane/swift/Snapshotfile.swift +1 -1
  66. data/fastlane/swift/SnapshotfileProtocol.swift +9 -1
  67. data/fastlane_core/lib/fastlane_core/build_watcher.rb +6 -2
  68. data/fastlane_core/lib/fastlane_core/cert_checker.rb +28 -0
  69. data/fastlane_core/lib/fastlane_core/device_manager.rb +20 -0
  70. data/fastlane_core/lib/fastlane_core/helper.rb +7 -1
  71. data/fastlane_core/lib/fastlane_core/ipa_file_analyser.rb +1 -0
  72. data/fastlane_core/lib/fastlane_core/keychain_importer.rb +2 -0
  73. data/fastlane_core/lib/fastlane_core/project.rb +27 -0
  74. data/frameit/lib/frameit/commands_generator.rb +25 -0
  75. data/frameit/lib/frameit/config_parser.rb +31 -9
  76. data/frameit/lib/frameit/device.rb +90 -0
  77. data/frameit/lib/frameit/device_types.rb +121 -5
  78. data/frameit/lib/frameit/editor.rb +31 -40
  79. data/frameit/lib/frameit/offsets.rb +8 -1
  80. data/frameit/lib/frameit/options.rb +81 -54
  81. data/frameit/lib/frameit/runner.rb +17 -7
  82. data/frameit/lib/frameit/screenshot.rb +35 -47
  83. data/frameit/lib/frameit/template_finder.rb +15 -12
  84. data/gym/lib/gym/code_signing_mapping.rb +32 -3
  85. data/gym/lib/gym/detect_values.rb +34 -2
  86. data/gym/lib/gym/generators/build_command_generator.rb +1 -0
  87. data/gym/lib/gym/generators/package_command_generator.rb +4 -0
  88. data/gym/lib/gym/generators/package_command_generator_xcode7.rb +47 -17
  89. data/gym/lib/gym/module.rb +8 -0
  90. data/gym/lib/gym/options.rb +25 -1
  91. data/gym/lib/gym/runner.rb +64 -24
  92. data/match/lib/match/change_password.rb +1 -1
  93. data/match/lib/match/encryption.rb +4 -0
  94. data/match/lib/match/encryption/openssl.rb +1 -1
  95. data/match/lib/match/generator.rb +17 -3
  96. data/match/lib/match/importer.rb +2 -2
  97. data/match/lib/match/module.rb +5 -2
  98. data/match/lib/match/nuke.rb +59 -17
  99. data/match/lib/match/options.rb +38 -15
  100. data/match/lib/match/runner.rb +24 -8
  101. data/match/lib/match/setup.rb +1 -1
  102. data/match/lib/match/spaceship_ensure.rb +19 -9
  103. data/match/lib/match/storage.rb +4 -0
  104. data/match/lib/match/storage/git_storage.rb +5 -2
  105. data/match/lib/match/storage/google_cloud_storage.rb +2 -2
  106. data/match/lib/match/storage/s3_storage.rb +162 -0
  107. data/pilot/lib/pilot/.manager.rb.swp +0 -0
  108. data/pilot/lib/pilot/build_manager.rb +55 -15
  109. data/pilot/lib/pilot/options.rb +3 -1
  110. data/scan/lib/scan/detect_values.rb +6 -1
  111. data/scan/lib/scan/manager.rb +18 -1
  112. data/scan/lib/scan/options.rb +28 -1
  113. data/scan/lib/scan/runner.rb +11 -3
  114. data/scan/lib/scan/slack_poster.rb +1 -1
  115. data/scan/lib/scan/test_command_generator.rb +9 -5
  116. data/screengrab/lib/screengrab/runner.rb +31 -18
  117. data/snapshot/lib/snapshot/fixes/simulator_shared_pasteboard.rb +16 -0
  118. data/snapshot/lib/snapshot/options.rb +12 -1
  119. data/snapshot/lib/snapshot/simulator_launchers/launcher_configuration.rb +2 -0
  120. data/snapshot/lib/snapshot/simulator_launchers/simulator_launcher_base.rb +13 -0
  121. data/spaceship/lib/spaceship/connect_api/.DS_Store +0 -0
  122. data/spaceship/lib/spaceship/connect_api/models/beta_feedback.rb +4 -0
  123. data/spaceship/lib/spaceship/connect_api/models/build.rb +4 -0
  124. data/spaceship/lib/spaceship/connect_api/models/build_beta_detail.rb +5 -0
  125. data/spaceship/lib/spaceship/connect_api/models/certificate.rb +2 -0
  126. data/spaceship/lib/spaceship/connect_api/testflight/testflight.rb +6 -0
  127. data/spaceship/lib/spaceship/portal/.certificate.rb.swp +0 -0
  128. data/spaceship/lib/spaceship/portal/app.rb +11 -2
  129. data/spaceship/lib/spaceship/tunes/iap.rb +11 -11
  130. data/spaceship/lib/spaceship/tunes/iap_detail.rb +7 -3
  131. data/spaceship/lib/spaceship/tunes/iap_families.rb +12 -1
  132. data/spaceship/lib/spaceship/tunes/iap_family_details.rb +26 -17
  133. data/spaceship/lib/spaceship/tunes/iap_status.rb +5 -1
  134. data/spaceship/lib/spaceship/tunes/tunes_client.rb +2 -2
  135. data/supply/lib/supply/client.rb +26 -0
  136. data/supply/lib/supply/uploader.rb +28 -0
  137. metadata +64 -20
@@ -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,8 +37,11 @@ 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 << "-maximum-concurrent-test-simulator-destinations #{config[:max_concurrent_simulators]}" if config[:max_concurrent_simulators]
41
- options << "-disable-concurrent-testing" if config[:disable_concurrent_testing]
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?
@@ -120,7 +123,7 @@ module Scan
120
123
 
121
124
  # Store the raw file
122
125
  def xcodebuild_log_path
123
- file_name = "#{Scan.project.app_name}-#{Scan.config[:scheme]}.log"
126
+ file_name = "#{Scan.config[:app_name] || Scan.project.app_name}-#{Scan.config[:scheme]}.log"
124
127
  containing = File.expand_path(Scan.config[:buildlog_path])
125
128
  FileUtils.mkdir_p(containing)
126
129
 
@@ -148,7 +151,8 @@ module Scan
148
151
 
149
152
  def result_bundle_path
150
153
  unless Scan.cache[:result_bundle_path]
151
- path = File.join(Scan.config[:output_directory], Scan.config[:scheme]) + ".test_result"
154
+ ext = FastlaneCore::Helper.xcode_version.to_i >= 11 ? '.xcresult' : '.test_result'
155
+ path = File.join(Scan.config[:output_directory], Scan.config[:scheme]) + ext
152
156
  if File.directory?(path)
153
157
  FileUtils.remove_dir(path)
154
158
  end
@@ -73,15 +73,11 @@ module Screengrab
73
73
 
74
74
  validate_apk(app_apk_path)
75
75
 
76
- enable_clean_status_bar(device_serial, app_apk_path)
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
- "/data/user/0/#{app_package_name}/files/#{app_package_name}/screengrab/#{locale}/images/screenshots"
151
- end
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"] + locale_paths
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
- if starting_screenshot_count == ending_screenshot_count
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)
@@ -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
 
@@ -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
@@ -78,6 +78,10 @@ module Spaceship
78
78
  return processing_state != ProcessingState::PROCESSING
79
79
  end
80
80
 
81
+ def ready_for_internal_testing?
82
+ return build_beta_detail.nil? == false && build_beta_detail.ready_for_internal_testing?
83
+ end
84
+
81
85
  def ready_for_beta_submission?
82
86
  raise "No build_beta_detail included" unless build_beta_detail
83
87
  return build_beta_detail.ready_for_beta_submission?
@@ -10,6 +10,7 @@ module Spaceship
10
10
  attr_accessor :external_build_state
11
11
 
12
12
  module InternalState
13
+ PROCESSING = "PROCESSING"
13
14
  PROCESSING_EXCEPTION = "PROCESSING_EXCEPTION"
14
15
  MISSING_EXPORT_COMPLIANCE = "MISSING_EXPORT_COMPLIANCE"
15
16
  READY_FOR_BETA_TESTING = "READY_FOR_BETA_TESTING"
@@ -47,6 +48,10 @@ module Spaceship
47
48
  #
48
49
  # Helpers
49
50
  #
51
+ #
52
+ def ready_for_internal_testing?
53
+ return internal_build_state == InternalState::READY_FOR_BETA_TESTING
54
+ end
50
55
 
51
56
  def ready_for_beta_submission?
52
57
  return external_build_state == ExternalState::READY_FOR_BETA_SUBMISSION
@@ -22,6 +22,8 @@ module Spaceship
22
22
  })
23
23
 
24
24
  module CertificateType
25
+ DEVELOPMENT = "DEVELOPMENT"
26
+ DISTRIBUTION = "DISTRIBUTION"
25
27
  IOS_DEVELOPMENT = "IOS_DEVELOPMENT"
26
28
  IOS_DISTRIBUTION = "IOS_DISTRIBUTION"
27
29
  MAC_APP_DISTRIBUTION = "MAC_APP_DISTRIBUTION"
@@ -326,6 +326,12 @@ module Spaceship
326
326
  params = Client.instance.build_params(filter: filter, includes: includes, limit: limit, sort: sort)
327
327
  Client.instance.get("betaFeedbacks", params)
328
328
  end
329
+
330
+ def delete_beta_feedback(feedback_id: nil)
331
+ raise "Feedback id is nil" if feedback_id.nil?
332
+
333
+ Client.instance.delete("betaFeedbacks/#{feedback_id}")
334
+ end
329
335
  end
330
336
  end
331
337
  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
- return app if app.bundle_id.casecmp(bundle_id) == 0
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
 
@@ -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)
@@ -80,7 +80,9 @@ module Spaceship
80
80
  language = localized_version["value"]["localeCode"]
81
81
  parsed_versions[language.to_sym] = {
82
82
  name: localized_version["value"]["name"]["value"],
83
- description: localized_version["value"]["description"]["value"]
83
+ description: localized_version["value"]["description"]["value"],
84
+ id: localized_version["value"]["id"],
85
+ status: localized_version["value"]["status"]
84
86
  }
85
87
  end
86
88
  return parsed_versions
@@ -98,7 +100,8 @@ module Spaceship
98
100
  "value" => {
99
101
  "name" => { "value" => current_version[:name] },
100
102
  "description" => { "value" => current_version[:description] },
101
- "localeCode" => language.to_s
103
+ "localeCode" => language.to_s,
104
+ "id" => current_version[:id]
102
105
  }
103
106
  }
104
107
  end
@@ -167,7 +170,8 @@ module Spaceship
167
170
  "value" => {
168
171
  "description" => { "value" => value[:description] },
169
172
  "name" => { "value" => value[:name] },
170
- "localeCode" => language.to_s
173
+ "localeCode" => language.to_s,
174
+ "id" => value[:id]
171
175
  }
172
176
  }
173
177
  end
@@ -40,7 +40,7 @@ module Spaceship
40
40
  client.create_iap_family(app_id: self.application.apple_id, name: name, product_id: product_id, reference_name: reference_name, versions: versions_array)
41
41
  end
42
42
 
43
- # returns a list of all families
43
+ # returns a list of all available subscription groups/families of the current In-App-Purchase
44
44
  def all
45
45
  r = client.iap_families(app_id: self.application.apple_id)
46
46
  return_families = []
@@ -52,6 +52,17 @@ module Spaceship
52
52
  end
53
53
  return_families
54
54
  end
55
+
56
+ # find a specific family
57
+ # @param family_id (String) Family Id
58
+ def find(family_id)
59
+ all.each do |family|
60
+ if family.family_id == family_id
61
+ return family
62
+ end
63
+ end
64
+ return nil
65
+ end
55
66
  end
56
67
  end
57
68
  end