fastlane 2.176.0 → 2.177.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (50) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +80 -80
  3. data/deliver/lib/deliver/app_screenshot.rb +6 -2
  4. data/deliver/lib/deliver/runner.rb +1 -1
  5. data/deliver/lib/deliver/upload_metadata.rb +3 -3
  6. data/deliver/lib/deliver/upload_screenshots.rb +10 -10
  7. data/fastlane/lib/fastlane/actions/app_store_connect_api_key.rb +1 -1
  8. data/fastlane/lib/fastlane/actions/appaloosa.rb +7 -2
  9. data/fastlane/lib/fastlane/actions/push_to_git_remote.rb +0 -1
  10. data/fastlane/lib/fastlane/actions/upload_symbols_to_crashlytics.rb +4 -5
  11. data/fastlane/lib/fastlane/version.rb +1 -1
  12. data/fastlane/swift/Deliverfile.swift +1 -1
  13. data/fastlane/swift/DeliverfileProtocol.swift +1 -1
  14. data/fastlane/swift/Fastlane.swift +14 -5
  15. data/fastlane/swift/Gymfile.swift +1 -1
  16. data/fastlane/swift/GymfileProtocol.swift +1 -1
  17. data/fastlane/swift/Matchfile.swift +1 -1
  18. data/fastlane/swift/MatchfileProtocol.swift +1 -1
  19. data/fastlane/swift/Precheckfile.swift +1 -1
  20. data/fastlane/swift/PrecheckfileProtocol.swift +1 -1
  21. data/fastlane/swift/Scanfile.swift +1 -1
  22. data/fastlane/swift/ScanfileProtocol.swift +5 -1
  23. data/fastlane/swift/Screengrabfile.swift +1 -1
  24. data/fastlane/swift/ScreengrabfileProtocol.swift +1 -1
  25. data/fastlane/swift/Snapshotfile.swift +1 -1
  26. data/fastlane/swift/SnapshotfileProtocol.swift +1 -1
  27. data/fastlane/swift/formatting/Brewfile.lock.json +12 -12
  28. data/fastlane_core/lib/fastlane_core.rb +1 -0
  29. data/fastlane_core/lib/fastlane_core/ipa_upload_package_builder.rb +3 -2
  30. data/fastlane_core/lib/fastlane_core/itunes_transporter.rb +4 -2
  31. data/fastlane_core/lib/fastlane_core/pkg_upload_package_builder.rb +3 -2
  32. data/{deliver/lib/deliver → fastlane_core/lib/fastlane_core}/queue_worker.rb +2 -2
  33. data/gym/lib/gym/.runner.rb.swp +0 -0
  34. data/gym/lib/gym/generators/.package_command_generator_xcode7.rb.swp +0 -0
  35. data/pilot/lib/pilot/build_manager.rb +9 -2
  36. data/scan/lib/scan/detect_values.rb +4 -1
  37. data/scan/lib/scan/options.rb +5 -0
  38. data/snapshot/lib/snapshot/simulator_launchers/simulator_launcher_base.rb +2 -1
  39. data/spaceship/lib/spaceship/client.rb +18 -17
  40. data/spaceship/lib/spaceship/connect_api/api_client.rb +24 -6
  41. data/spaceship/lib/spaceship/connect_api/models/app.rb +1 -1
  42. data/spaceship/lib/spaceship/connect_api/models/app_preview_set.rb +5 -0
  43. data/spaceship/lib/spaceship/connect_api/models/app_screenshot_set.rb +5 -0
  44. data/spaceship/lib/spaceship/connect_api/models/app_store_version_localization.rb +6 -0
  45. data/spaceship/lib/spaceship/connect_api/models/build.rb +5 -0
  46. data/spaceship/lib/spaceship/connect_api/models/build_beta_detail.rb +4 -0
  47. data/spaceship/lib/spaceship/connect_api/models/user_invitation.rb +13 -0
  48. data/spaceship/lib/spaceship/connect_api/tunes/tunes.rb +15 -0
  49. metadata +20 -19
  50. data/pilot/lib/pilot/.build_manager.rb.swp +0 -0
@@ -17,4 +17,4 @@ public class Deliverfile: DeliverfileProtocol {
17
17
  // during the `init` process, and you won't see this message
18
18
  }
19
19
 
20
- // Generated with fastlane 2.176.0
20
+ // Generated with fastlane 2.177.0
@@ -256,4 +256,4 @@ public extension DeliverfileProtocol {
256
256
 
257
257
  // Please don't remove the lines below
258
258
  // They are used to detect outdated files
259
- // FastlaneRunnerAPIVersion [0.9.59]
259
+ // FastlaneRunnerAPIVersion [0.9.60]
@@ -149,7 +149,7 @@ public func appStoreBuildNumber(apiKeyPath: String? = nil,
149
149
  - keyContent: The content of the key p8 file
150
150
  - isKeyContentBase64: Whether :key_content is Base64 encoded or not
151
151
  - duration: The token session duration
152
- - inHouse: Is App Store or Enterprise (in house) team? App Store Connect API cannot not determine this on its own (yet)
152
+ - inHouse: Is App Store or Enterprise (in house) team? App Store Connect API cannot determine this on its own (yet)
153
153
 
154
154
  Load the App Store Connect API token to use in other fastlane tools and actions
155
155
  */
@@ -183,6 +183,7 @@ public func appStoreConnectApiKey(keyId: String,
183
183
  - locale: Select the folder locale for your screenshots
184
184
  - device: Select the device format for your screenshots
185
185
  - description: Your app description
186
+ - changelog: Your app changelog
186
187
 
187
188
  Appaloosa is a private mobile application store. This action offers a quick deployment on the platform.
188
189
  You can create an account, push to your existing account, or manage your user groups.
@@ -195,7 +196,8 @@ public func appaloosa(binary: String,
195
196
  screenshots: String,
196
197
  locale: String = "en-US",
197
198
  device: String? = nil,
198
- description: String? = nil)
199
+ description: String? = nil,
200
+ changelog: String? = nil)
199
201
  {
200
202
  let command = RubyCommand(commandID: "", methodName: "appaloosa", className: nil, args: [RubyCommand.Argument(name: "binary", value: binary),
201
203
  RubyCommand.Argument(name: "api_token", value: apiToken),
@@ -204,7 +206,8 @@ public func appaloosa(binary: String,
204
206
  RubyCommand.Argument(name: "screenshots", value: screenshots),
205
207
  RubyCommand.Argument(name: "locale", value: locale),
206
208
  RubyCommand.Argument(name: "device", value: device),
207
- RubyCommand.Argument(name: "description", value: description)])
209
+ RubyCommand.Argument(name: "description", value: description),
210
+ RubyCommand.Argument(name: "changelog", value: changelog)])
208
211
  _ = runner.executeCommand(command)
209
212
  }
210
213
 
@@ -6189,6 +6192,7 @@ public func rubyVersion() {
6189
6192
  - device: The name of the simulator type you want to run tests on (e.g. 'iPhone 6')
6190
6193
  - devices: Array of devices to run the tests on (e.g. ['iPhone 6', 'iPad Air'])
6191
6194
  - skipDetectDevices: Should skip auto detecting of devices if none were specified
6195
+ - ensureDevicesFound: Should fail if devices not found
6192
6196
  - forceQuitSimulator: Enabling this option will automatically killall Simulator processes before the run
6193
6197
  - resetSimulator: Enabling this option will automatically erase the simulator before running the application
6194
6198
  - disableSlideToType: Enabling this option will disable the simulator from showing the 'Slide to type' prompt
@@ -6261,6 +6265,7 @@ public func runTests(workspace: String? = nil,
6261
6265
  device: String? = nil,
6262
6266
  devices: [String]? = nil,
6263
6267
  skipDetectDevices: Bool = false,
6268
+ ensureDevicesFound: Bool = false,
6264
6269
  forceQuitSimulator: Bool = false,
6265
6270
  resetSimulator: Bool = false,
6266
6271
  disableSlideToType: Bool = true,
@@ -6331,6 +6336,7 @@ public func runTests(workspace: String? = nil,
6331
6336
  RubyCommand.Argument(name: "device", value: device),
6332
6337
  RubyCommand.Argument(name: "devices", value: devices),
6333
6338
  RubyCommand.Argument(name: "skip_detect_devices", value: skipDetectDevices),
6339
+ RubyCommand.Argument(name: "ensure_devices_found", value: ensureDevicesFound),
6334
6340
  RubyCommand.Argument(name: "force_quit_simulator", value: forceQuitSimulator),
6335
6341
  RubyCommand.Argument(name: "reset_simulator", value: resetSimulator),
6336
6342
  RubyCommand.Argument(name: "disable_slide_to_type", value: disableSlideToType),
@@ -6483,6 +6489,7 @@ public func say(text: Any,
6483
6489
  - device: The name of the simulator type you want to run tests on (e.g. 'iPhone 6')
6484
6490
  - devices: Array of devices to run the tests on (e.g. ['iPhone 6', 'iPad Air'])
6485
6491
  - skipDetectDevices: Should skip auto detecting of devices if none were specified
6492
+ - ensureDevicesFound: Should fail if devices not found
6486
6493
  - forceQuitSimulator: Enabling this option will automatically killall Simulator processes before the run
6487
6494
  - resetSimulator: Enabling this option will automatically erase the simulator before running the application
6488
6495
  - disableSlideToType: Enabling this option will disable the simulator from showing the 'Slide to type' prompt
@@ -6555,6 +6562,7 @@ public func scan(workspace: Any? = scanfile.workspace,
6555
6562
  device: Any? = scanfile.device,
6556
6563
  devices: [String]? = scanfile.devices,
6557
6564
  skipDetectDevices: Bool = scanfile.skipDetectDevices,
6565
+ ensureDevicesFound: Bool = scanfile.ensureDevicesFound,
6558
6566
  forceQuitSimulator: Bool = scanfile.forceQuitSimulator,
6559
6567
  resetSimulator: Bool = scanfile.resetSimulator,
6560
6568
  disableSlideToType: Bool = scanfile.disableSlideToType,
@@ -6625,6 +6633,7 @@ public func scan(workspace: Any? = scanfile.workspace,
6625
6633
  RubyCommand.Argument(name: "device", value: device),
6626
6634
  RubyCommand.Argument(name: "devices", value: devices),
6627
6635
  RubyCommand.Argument(name: "skip_detect_devices", value: skipDetectDevices),
6636
+ RubyCommand.Argument(name: "ensure_devices_found", value: ensureDevicesFound),
6628
6637
  RubyCommand.Argument(name: "force_quit_simulator", value: forceQuitSimulator),
6629
6638
  RubyCommand.Argument(name: "reset_simulator", value: resetSimulator),
6630
6639
  RubyCommand.Argument(name: "disable_slide_to_type", value: disableSlideToType),
@@ -9510,7 +9519,7 @@ public func xcov(workspace: String? = nil,
9510
9519
  coverallsServiceJobId: String? = nil,
9511
9520
  coverallsRepoToken: String? = nil,
9512
9521
  xcconfig: String? = nil,
9513
- ideFoundationPath: String = "/Applications/Xcode-12.2.app/Contents/Developer/../Frameworks/IDEFoundation.framework/Versions/A/IDEFoundation",
9522
+ ideFoundationPath: String = "/Applications/Xcode-12.4.app/Contents/Developer/../Frameworks/IDEFoundation.framework/Versions/A/IDEFoundation",
9514
9523
  legacySupport: Bool = false)
9515
9524
  {
9516
9525
  let command = RubyCommand(commandID: "", methodName: "xcov", className: nil, args: [RubyCommand.Argument(name: "workspace", value: workspace),
@@ -9656,4 +9665,4 @@ public let snapshotfile = Snapshotfile()
9656
9665
 
9657
9666
  // Please don't remove the lines below
9658
9667
  // They are used to detect outdated files
9659
- // FastlaneRunnerAPIVersion [0.9.112]
9668
+ // FastlaneRunnerAPIVersion [0.9.113]
@@ -17,4 +17,4 @@ public class Gymfile: GymfileProtocol {
17
17
  // during the `init` process, and you won't see this message
18
18
  }
19
19
 
20
- // Generated with fastlane 2.176.0
20
+ // Generated with fastlane 2.177.0
@@ -196,4 +196,4 @@ public extension GymfileProtocol {
196
196
 
197
197
  // Please don't remove the lines below
198
198
  // They are used to detect outdated files
199
- // FastlaneRunnerAPIVersion [0.9.62]
199
+ // FastlaneRunnerAPIVersion [0.9.63]
@@ -17,4 +17,4 @@ public class Matchfile: MatchfileProtocol {
17
17
  // during the `init` process, and you won't see this message
18
18
  }
19
19
 
20
- // Generated with fastlane 2.176.0
20
+ // Generated with fastlane 2.177.0
@@ -184,4 +184,4 @@ public extension MatchfileProtocol {
184
184
 
185
185
  // Please don't remove the lines below
186
186
  // They are used to detect outdated files
187
- // FastlaneRunnerAPIVersion [0.9.56]
187
+ // FastlaneRunnerAPIVersion [0.9.57]
@@ -17,4 +17,4 @@ public class Precheckfile: PrecheckfileProtocol {
17
17
  // during the `init` process, and you won't see this message
18
18
  }
19
19
 
20
- // Generated with fastlane 2.176.0
20
+ // Generated with fastlane 2.177.0
@@ -52,4 +52,4 @@ public extension PrecheckfileProtocol {
52
52
 
53
53
  // Please don't remove the lines below
54
54
  // They are used to detect outdated files
55
- // FastlaneRunnerAPIVersion [0.9.55]
55
+ // FastlaneRunnerAPIVersion [0.9.56]
@@ -17,4 +17,4 @@ public class Scanfile: ScanfileProtocol {
17
17
  // during the `init` process, and you won't see this message
18
18
  }
19
19
 
20
- // Generated with fastlane 2.176.0
20
+ // Generated with fastlane 2.177.0
@@ -20,6 +20,9 @@ public protocol ScanfileProtocol: class {
20
20
  /// Should skip auto detecting of devices if none were specified
21
21
  var skipDetectDevices: Bool { get }
22
22
 
23
+ /// Should fail if devices not found
24
+ var ensureDevicesFound: Bool { get }
25
+
23
26
  /// Enabling this option will automatically killall Simulator processes before the run
24
27
  var forceQuitSimulator: Bool { get }
25
28
 
@@ -217,6 +220,7 @@ public extension ScanfileProtocol {
217
220
  var device: String? { return nil }
218
221
  var devices: [String]? { return nil }
219
222
  var skipDetectDevices: Bool { return false }
223
+ var ensureDevicesFound: Bool { return false }
220
224
  var forceQuitSimulator: Bool { return false }
221
225
  var resetSimulator: Bool { return false }
222
226
  var disableSlideToType: Bool { return true }
@@ -284,4 +288,4 @@ public extension ScanfileProtocol {
284
288
 
285
289
  // Please don't remove the lines below
286
290
  // They are used to detect outdated files
287
- // FastlaneRunnerAPIVersion [0.9.67]
291
+ // FastlaneRunnerAPIVersion [0.9.68]
@@ -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.176.0
20
+ // Generated with fastlane 2.177.0
@@ -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.57]
99
+ // FastlaneRunnerAPIVersion [0.9.58]
@@ -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.176.0
20
+ // Generated with fastlane 2.177.0
@@ -196,4 +196,4 @@ public extension SnapshotfileProtocol {
196
196
 
197
197
  // Please don't remove the lines below
198
198
  // They are used to detect outdated files
199
- // FastlaneRunnerAPIVersion [0.9.51]
199
+ // FastlaneRunnerAPIVersion [0.9.52]
@@ -2,7 +2,7 @@
2
2
  "entries": {
3
3
  "brew": {
4
4
  "swiftformat": {
5
- "version": "0.47.11",
5
+ "version": "0.47.12",
6
6
  "bottle": {
7
7
  "rebuild": 0,
8
8
  "cellar": ":any_skip_relocation",
@@ -10,20 +10,20 @@
10
10
  "root_url": "https://homebrew.bintray.com/bottles",
11
11
  "files": {
12
12
  "arm64_big_sur": {
13
- "url": "https://homebrew.bintray.com/bottles/swiftformat-0.47.11.arm64_big_sur.bottle.tar.gz",
14
- "sha256": "65a20f75d4a9e2837dfc60318e312893b99f2a957a7f3a9a137b326c87dc29ff"
13
+ "url": "https://homebrew.bintray.com/bottles/swiftformat-0.47.12.arm64_big_sur.bottle.tar.gz",
14
+ "sha256": "334b736f7c78b1bc48882f55558e79571be591281462bc91dedea6dac10034be"
15
15
  },
16
16
  "big_sur": {
17
- "url": "https://homebrew.bintray.com/bottles/swiftformat-0.47.11.big_sur.bottle.tar.gz",
18
- "sha256": "0b4c55f9316fbf40c9eab826536df17eb0249484772c372a962a189e0d1a7fd2"
17
+ "url": "https://homebrew.bintray.com/bottles/swiftformat-0.47.12.big_sur.bottle.tar.gz",
18
+ "sha256": "b7ba5043f29c548dd05374125faa61dd07690bffe373890cb608609e4a7e2413"
19
19
  },
20
20
  "catalina": {
21
- "url": "https://homebrew.bintray.com/bottles/swiftformat-0.47.11.catalina.bottle.tar.gz",
22
- "sha256": "3b7bc3e4e6f150ecdd298be109d13ef9e84a56a45c580113c7a6b151fe1615da"
21
+ "url": "https://homebrew.bintray.com/bottles/swiftformat-0.47.12.catalina.bottle.tar.gz",
22
+ "sha256": "030b2e18168f5680c4ee387812b14057c4cb148b6f6800b983b1b298f4af15b1"
23
23
  },
24
24
  "mojave": {
25
- "url": "https://homebrew.bintray.com/bottles/swiftformat-0.47.11.mojave.bottle.tar.gz",
26
- "sha256": "24bdfac40c16c1e40bbe970eedb9450cd3099890188b8d6bdd0fe2447d54ce48"
25
+ "url": "https://homebrew.bintray.com/bottles/swiftformat-0.47.12.mojave.bottle.tar.gz",
26
+ "sha256": "b3e35821d3094d08eb9f8423ce7d18cb5462bb5b1d02a3156ed1a10f6539709a"
27
27
  }
28
28
  }
29
29
  }
@@ -33,11 +33,11 @@
33
33
  "system": {
34
34
  "macos": {
35
35
  "catalina": {
36
- "HOMEBREW_VERSION": "3.0.2",
36
+ "HOMEBREW_VERSION": "3.0.4-52-gbc37074",
37
37
  "HOMEBREW_PREFIX": "/usr/local",
38
- "Homebrew/homebrew-core": "372d8a99773af6b309354856d1295825ab43d7e0",
38
+ "Homebrew/homebrew-core": "6de8c1455224f0c7949aa103a6cf5721a7dcdde5",
39
39
  "CLT": "11.0.33.12",
40
- "Xcode": "12.2",
40
+ "Xcode": "12.4",
41
41
  "macOS": "10.15.7"
42
42
  },
43
43
  "big_sur": {
@@ -35,6 +35,7 @@ require_relative 'fastlane_core/analytics/analytics_ingester_client'
35
35
  require_relative 'fastlane_core/analytics/analytics_session'
36
36
  require_relative 'fastlane_core/tag_version'
37
37
  require_relative 'fastlane_core/fastlane_pty'
38
+ require_relative 'fastlane_core/queue_worker'
38
39
 
39
40
  # Third Party code
40
41
  require 'colored'
@@ -1,4 +1,5 @@
1
1
  require "digest/md5"
2
+ require 'securerandom'
2
3
 
3
4
  require_relative 'globals'
4
5
  require_relative 'ui/ui'
@@ -12,7 +13,7 @@ module FastlaneCore
12
13
  attr_accessor :package_path
13
14
 
14
15
  def generate(app_id: nil, ipa_path: nil, package_path: nil, platform: nil)
15
- self.package_path = File.join(package_path, "#{app_id}.itmsp")
16
+ self.package_path = File.join(package_path, "#{app_id}-#{SecureRandom.uuid}.itmsp")
16
17
  FileUtils.rm_rf(self.package_path) if File.directory?(self.package_path)
17
18
  FileUtils.mkdir_p(self.package_path)
18
19
 
@@ -32,7 +33,7 @@ module FastlaneCore
32
33
  File.write(File.join(self.package_path, METADATA_FILE_NAME), xml)
33
34
  UI.success("Wrote XML data to '#{self.package_path}'") if FastlaneCore::Globals.verbose?
34
35
 
35
- return package_path
36
+ return self.package_path
36
37
  end
37
38
 
38
39
  def unique_ipa_path(ipa_path)
@@ -471,11 +471,13 @@ module FastlaneCore
471
471
  # Uploads the modified package back to App Store Connect
472
472
  # @param app_id [Integer] The unique App ID
473
473
  # @param dir [String] the path in which the package file is located
474
+ # @param package_path [String] the path to the package file (used instead of app_id and dir)
474
475
  # @return (Bool) True if everything worked fine
475
476
  # @raise [Deliver::TransporterTransferError] when something went wrong
476
477
  # when transferring
477
- def upload(app_id, dir)
478
- actual_dir = File.join(dir, "#{app_id}.itmsp")
478
+ def upload(app_id = nil, dir = nil, package_path: nil)
479
+ raise "app_id and dir are required or package_path is required" if (app_id.nil? || dir.nil?) && package_path.nil?
480
+ actual_dir = package_path || File.join(dir, "#{app_id}.itmsp")
479
481
 
480
482
  UI.message("Going to upload updated app to App Store Connect")
481
483
  UI.success("This might take a few minutes. Please don't interrupt the script.")
@@ -1,4 +1,5 @@
1
1
  require 'digest/md5'
2
+ require 'securerandom'
2
3
 
3
4
  require_relative 'globals'
4
5
  require_relative 'ui/ui'
@@ -12,7 +13,7 @@ module FastlaneCore
12
13
  attr_accessor :package_path
13
14
 
14
15
  def generate(app_id: nil, pkg_path: nil, package_path: nil, platform: "osx")
15
- self.package_path = File.join(package_path, "#{app_id}.itmsp")
16
+ self.package_path = File.join(package_path, "#{app_id}-#{SecureRandom.uuid}.itmsp")
16
17
  FileUtils.rm_rf(self.package_path) if File.directory?(self.package_path)
17
18
  FileUtils.mkdir_p(self.package_path)
18
19
 
@@ -32,7 +33,7 @@ module FastlaneCore
32
33
  File.write(File.join(self.package_path, METADATA_FILE_NAME), xml)
33
34
  UI.success("Wrote XML data to '#{self.package_path}'") if FastlaneCore::Globals.verbose?
34
35
 
35
- package_path
36
+ return self.package_path
36
37
  end
37
38
 
38
39
  private
@@ -1,12 +1,12 @@
1
1
  require 'thread'
2
2
 
3
- module Deliver
3
+ module FastlaneCore
4
4
  # This dispatches jobs to worker threads and make it work in parallel.
5
5
  # It's suitable for I/O bounds works and not for CPU bounds works.
6
6
  # Use this when you have all the items that you'll process in advance.
7
7
  # Simply enqueue them to this and call `QueueWorker#start`.
8
8
  class QueueWorker
9
- NUMBER_OF_THREADS = Helper.test? ? 1 : [ENV.fetch("DELIVER_NUMBER_OF_THREADS", 10).to_i, 10].min
9
+ NUMBER_OF_THREADS = FastlaneCore::Helper.test? ? 1 : [(ENV["DELIVER_NUMBER_OF_THREADS"] || ENV.fetch("FL_NUMBER_OF_THREADS", 10)).to_i, 10].min
10
10
 
11
11
  # @param concurrency (Numeric) - A number of threads to be created
12
12
  # @param block (Proc) - A task you want to execute with enqueued items
Binary file
@@ -31,7 +31,7 @@ module Pilot
31
31
  platform: platform)
32
32
 
33
33
  transporter = transporter_for_selected_team(options)
34
- result = transporter.upload(fetch_app_id, package_path)
34
+ result = transporter.upload(package_path: package_path)
35
35
 
36
36
  unless result
37
37
  UI.user_error!("Error uploading ipa file, for more information see above")
@@ -428,7 +428,14 @@ module Pilot
428
428
 
429
429
  UI.important("Export compliance has been set to '#{uses_non_exempt_encryption}'. Need to wait for build to finishing processing again...")
430
430
  UI.important("Set 'ITSAppUsesNonExemptEncryption' in the 'Info.plist' to skip this step and speed up the submission")
431
- return wait_for_build_processing_to_be_complete
431
+
432
+ loop do
433
+ build = Spaceship::ConnectAPI::Build.get(build_id: uploaded_build.id)
434
+ return build unless build.missing_export_compliance?
435
+
436
+ UI.message("Waiting for build #{uploaded_build.id} to process export compliance")
437
+ sleep(5)
438
+ end
432
439
  else
433
440
  return uploaded_build
434
441
  end
@@ -162,7 +162,10 @@ module Scan
162
162
  filter_simulators(simulators, :equal, version).tap(&potential_emptiness_error).select(&selector)
163
163
  end
164
164
  ).tap do |array|
165
- UI.error("Ignoring '#{device_string}', couldn’t find matching simulator") if array.empty?
165
+ if array.empty?
166
+ UI.test_failure!("No device found with name '#{device_string}'") if Scan.config[:ensure_devices_found]
167
+ UI.error("Ignoring '#{device_string}', couldn’t find matching simulator")
168
+ end
166
169
  end
167
170
  end
168
171
 
@@ -69,6 +69,11 @@ module Scan
69
69
  default_value: false,
70
70
  type: Boolean,
71
71
  optional: true),
72
+ FastlaneCore::ConfigItem.new(key: :ensure_devices_found,
73
+ description: "Should fail if devices not found",
74
+ default_value: false,
75
+ type: Boolean,
76
+ optional: true),
72
77
 
73
78
  # simulator management
74
79
  FastlaneCore::ConfigItem.new(key: :force_quit_simulator,
@@ -69,7 +69,8 @@ module Snapshot
69
69
  unless launcher_config.dark_mode.nil?
70
70
  interface_style(type, launcher_config.dark_mode)
71
71
  end
72
- elsif launcher_config.reinstall_app
72
+ end
73
+ if launcher_config.reinstall_app && !launcher_config.erase_simulator
73
74
  # no need to reinstall if device has been erased
74
75
  uninstall_app(type)
75
76
  end
@@ -134,7 +134,7 @@ module Spaceship
134
134
  if teams.count > 1
135
135
  puts("The current user is in #{teams.count} teams. Pass a team ID or call `select_team` to choose a team. Using the first one for now.")
136
136
  end
137
- @current_team_id ||= teams[0]['contentProvider']['contentProviderId']
137
+ @current_team_id ||= user_details_data['sessionToken']['contentProviderId']
138
138
  end
139
139
 
140
140
  # Set a new team ID which will be used from now on
@@ -171,6 +171,9 @@ module Spaceship
171
171
 
172
172
  handle_itc_response(response.body)
173
173
 
174
+ # clear user_details_data cache, as session switch will have changed sessionToken attribute
175
+ @_cached_user_details = nil
176
+
174
177
  @current_team_id = team_id
175
178
  end
176
179
 
@@ -880,10 +883,7 @@ module Spaceship
880
883
  response = @client.send(method, url_or_path, params, headers, &block)
881
884
  log_response(method, url_or_path, response, headers, &block)
882
885
 
883
- resp_hash = response.to_hash
884
- if resp_hash[:status] == 401
885
- handle_401(response)
886
- end
886
+ handle_error(response)
887
887
 
888
888
  if response.body.to_s.include?("<title>302 Found</title>")
889
889
  raise AppleTimeoutError.new, "Apple 302 detected - this might be temporary server error, check https://developer.apple.com/system-status/ to see if there is a known downtime"
@@ -893,22 +893,23 @@ module Spaceship
893
893
  raise BadGatewayError.new, "Apple 502 detected - this might be temporary server error, try again later"
894
894
  end
895
895
 
896
- if resp_hash[:status] == 403
897
- msg = "Access forbidden"
898
- logger.warn(msg)
899
- raise AccessForbiddenError.new, msg
900
- elsif resp_hash[:status] == 429
901
- raise TooManyRequestsError, resp_hash
902
- end
903
-
904
896
  return response
905
897
  end
906
898
  end
907
899
 
908
- def handle_401(response)
909
- msg = "Auth lost"
910
- logger.warn(msg)
911
- raise UnauthorizedAccessError.new, "Unauthorized Access"
900
+ def handle_error(response)
901
+ case response.status
902
+ when 401
903
+ msg = "Auth lost"
904
+ logger.warn(msg)
905
+ raise UnauthorizedAccessError.new, "Unauthorized Access"
906
+ when 403
907
+ msg = "Access forbidden"
908
+ logger.warn(msg)
909
+ raise AccessForbiddenError.new, msg
910
+ when 429
911
+ raise TooManyRequestsError, response.to_hash
912
+ end
912
913
  end
913
914
 
914
915
  def send_request_auto_paginate(method, url_or_path, params, headers, &block)