fastlane 2.151.1 → 2.154.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (74) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +74 -74
  3. data/deliver/lib/deliver/app_screenshot.rb +1 -1
  4. data/deliver/lib/deliver/commands_generator.rb +7 -4
  5. data/deliver/lib/deliver/detect_values.rb +9 -3
  6. data/deliver/lib/deliver/download_screenshots.rb +36 -31
  7. data/deliver/lib/deliver/options.rb +1 -1
  8. data/deliver/lib/deliver/runner.rb +5 -10
  9. data/deliver/lib/deliver/setup.rb +92 -3
  10. data/deliver/lib/deliver/submit_for_review.rb +4 -6
  11. data/deliver/lib/deliver/upload_metadata.rb +53 -32
  12. data/deliver/lib/deliver/upload_price_tier.rb +1 -3
  13. data/deliver/lib/deliver/upload_screenshots.rb +76 -45
  14. data/{deliver/lib/deliver/.commands_generator.rb.swp → fastlane/lib/fastlane/.erb_template_helper.rb.swp} +0 -0
  15. data/{frameit/lib/frameit/.editor.rb.swp → fastlane/lib/fastlane/actions/.git_commit.rb.swp} +0 -0
  16. data/fastlane/lib/fastlane/actions/carthage.rb +7 -0
  17. data/fastlane/lib/fastlane/actions/docs/frame_screenshots.md +3 -1
  18. data/fastlane/lib/fastlane/actions/docs/sync_code_signing.md +21 -2
  19. data/fastlane/lib/fastlane/actions/docs/upload_to_app_store.md.erb +4 -4
  20. data/fastlane/lib/fastlane/actions/download_dsyms.rb +4 -2
  21. data/fastlane/lib/fastlane/actions/erb.rb +10 -2
  22. data/fastlane/lib/fastlane/actions/git_branch.rb +4 -1
  23. data/fastlane/lib/fastlane/actions/git_pull.rb +13 -2
  24. data/fastlane/lib/fastlane/actions/upload_to_testflight.rb +11 -3
  25. data/fastlane/lib/fastlane/helper/s3_client_helper.rb +1 -1
  26. data/fastlane/lib/fastlane/runner.rb +3 -1
  27. data/fastlane/lib/fastlane/version.rb +1 -1
  28. data/fastlane/swift/Deliverfile.swift +1 -1
  29. data/fastlane/swift/DeliverfileProtocol.swift +3 -3
  30. data/fastlane/swift/Fastlane.swift +47 -13
  31. data/fastlane/swift/Gymfile.swift +1 -1
  32. data/fastlane/swift/GymfileProtocol.swift +1 -1
  33. data/fastlane/swift/Matchfile.swift +1 -1
  34. data/fastlane/swift/MatchfileProtocol.swift +5 -1
  35. data/fastlane/swift/Precheckfile.swift +1 -1
  36. data/fastlane/swift/PrecheckfileProtocol.swift +1 -1
  37. data/fastlane/swift/Scanfile.swift +1 -1
  38. data/fastlane/swift/ScanfileProtocol.swift +1 -1
  39. data/fastlane/swift/Screengrabfile.swift +1 -1
  40. data/fastlane/swift/ScreengrabfileProtocol.swift +1 -1
  41. data/fastlane/swift/Snapshotfile.swift +1 -1
  42. data/fastlane/swift/SnapshotfileProtocol.swift +5 -1
  43. data/fastlane_core/lib/fastlane_core/device_manager.rb +25 -6
  44. data/fastlane_core/lib/fastlane_core/itunes_transporter.rb +6 -3
  45. data/frameit/lib/frameit/editor.rb +11 -6
  46. data/gym/lib/gym/module.rb +8 -0
  47. data/gym/lib/gym/runner.rb +16 -9
  48. data/match/lib/match/options.rb +9 -2
  49. data/match/lib/match/runner.rb +5 -4
  50. data/match/lib/match/storage/git_storage.rb +16 -2
  51. data/pilot/lib/pilot/build_manager.rb +9 -0
  52. data/pilot/lib/pilot/options.rb +7 -1
  53. data/scan/lib/scan/runner.rb +19 -6
  54. data/snapshot/lib/snapshot/options.rb +5 -0
  55. data/snapshot/lib/snapshot/simulator_launchers/launcher_configuration.rb +2 -0
  56. data/snapshot/lib/snapshot/simulator_launchers/simulator_launcher_base.rb +5 -0
  57. data/spaceship/lib/spaceship/connect_api.rb +1 -0
  58. data/spaceship/lib/spaceship/connect_api/client.rb +3 -3
  59. data/spaceship/lib/spaceship/connect_api/model.rb +14 -0
  60. data/spaceship/lib/spaceship/connect_api/models/age_rating_declaration.rb +1 -0
  61. data/spaceship/lib/spaceship/connect_api/models/app.rb +59 -3
  62. data/spaceship/lib/spaceship/connect_api/models/app_info_localization.rb +1 -0
  63. data/spaceship/lib/spaceship/connect_api/models/app_preview.rb +5 -4
  64. data/spaceship/lib/spaceship/connect_api/models/app_screenshot.rb +44 -5
  65. data/spaceship/lib/spaceship/connect_api/models/app_store_review_detail.rb +1 -0
  66. data/spaceship/lib/spaceship/connect_api/models/app_store_version.rb +12 -0
  67. data/spaceship/lib/spaceship/connect_api/models/app_store_version_localization.rb +1 -0
  68. data/spaceship/lib/spaceship/connect_api/models/app_store_version_release_request.rb +12 -0
  69. data/spaceship/lib/spaceship/connect_api/models/build.rb +1 -0
  70. data/spaceship/lib/spaceship/connect_api/models/idfa_declaration.rb +1 -0
  71. data/spaceship/lib/spaceship/connect_api/tunes/tunes.rb +32 -1
  72. metadata +37 -64
  73. data/deliver/lib/deliver/.download_screenshots.rb.swp +0 -0
  74. data/deliver/lib/deliver/.submit_for_review.rb.swp +0 -0
@@ -122,7 +122,7 @@ module Pilot
122
122
  short_option: "-w",
123
123
  optional: true,
124
124
  env_name: "PILOT_CHANGELOG",
125
- description: "Provide the 'What to Test' text when uploading a new build. `skip_waiting_for_build_processing: false` is required to set the changelog"),
125
+ description: "Provide the 'What to Test' text when uploading a new build"),
126
126
  FastlaneCore::ConfigItem.new(key: :skip_submission,
127
127
  short_option: "-s",
128
128
  env_name: "PILOT_SKIP_SUBMISSION",
@@ -146,6 +146,12 @@ module Pilot
146
146
  default_value: false),
147
147
 
148
148
  # distribution
149
+ FastlaneCore::ConfigItem.new(key: :distribute_only,
150
+ short_option: "-D",
151
+ env_name: "PILOT_DISTRIBUTE_ONLY",
152
+ description: "Distribute a previously uploaded build (equivalent to the `fastlane pilot distribute` command)",
153
+ default_value: false,
154
+ type: Boolean),
149
155
  FastlaneCore::ConfigItem.new(key: :uses_non_exempt_encryption,
150
156
  short_option: "-X",
151
157
  env_name: "PILOT_USES_NON_EXEMPT_ENCRYPTION",
@@ -39,12 +39,7 @@ module Scan
39
39
  end
40
40
  end
41
41
 
42
- # We call this method, to be sure that all other simulators are killed
43
- # And a correct one is freshly launched. Switching between multiple simulator
44
- # in case the user specified multiple targets works with no issues
45
- # This way it's okay to just call it for the first simulator we're using for
46
- # the first test run
47
- FastlaneCore::Simulator.launch(Scan.devices.first) if Scan.devices && Scan.config[:prelaunch_simulator]
42
+ prelaunch_simulators
48
43
 
49
44
  if Scan.config[:reinstall_app]
50
45
  app_identifier = Scan.config[:app_identifier]
@@ -165,6 +160,24 @@ module Scan
165
160
  File.read(Scan.cache[:temp_junit_report])
166
161
  end
167
162
 
163
+ def prelaunch_simulators
164
+ return unless Scan.devices.to_a.size > 0 # no devices selected, no sims to launch
165
+
166
+ # Return early unless the user wants to prelaunch simulators. Or if the user wants simulator logs
167
+ # then we must prelaunch simulators because Xcode's headless
168
+ # mode launches and shutsdown the simulators before we can collect the logs.
169
+ return unless Scan.config[:prelaunch_simulator] || Scan.config[:include_simulator_logs]
170
+
171
+ devices_to_shutdown = []
172
+ Scan.devices.each do |device|
173
+ devices_to_shutdown << device if device.state == "Shutdown"
174
+ device.boot
175
+ end
176
+ at_exit do
177
+ devices_to_shutdown.each(&:shutdown)
178
+ end
179
+ end
180
+
168
181
  def copy_simulator_logs
169
182
  return unless Scan.config[:include_simulator_logs]
170
183
 
@@ -116,6 +116,11 @@ module Snapshot
116
116
  description: "Enabling this option will automatically erase the simulator before running the application",
117
117
  default_value: false,
118
118
  is_string: false),
119
+ FastlaneCore::ConfigItem.new(key: :headless,
120
+ env_name: 'SNAPSHOT_HEADLESS',
121
+ description: "Enabling this option will prevent displaying the simulator window",
122
+ default_value: true,
123
+ type: Boolean),
119
124
  FastlaneCore::ConfigItem.new(key: :override_status_bar,
120
125
  env_name: 'SNAPSHOT_OVERRIDE_STATUS_BAR',
121
126
  description: "Enabling this option wil automatically override the status bar to show 9:41 AM, full battery, and full reception",
@@ -7,6 +7,7 @@ module Snapshot
7
7
  attr_accessor :add_videos
8
8
  attr_accessor :clean
9
9
  attr_accessor :erase_simulator
10
+ attr_accessor :headless
10
11
  attr_accessor :localize_simulator
11
12
  attr_accessor :dark_mode
12
13
  attr_accessor :reinstall_app
@@ -34,6 +35,7 @@ module Snapshot
34
35
  @add_videos = snapshot_config[:add_videos]
35
36
  @clean = snapshot_config[:clean]
36
37
  @erase_simulator = snapshot_config[:erase_simulator]
38
+ @headless = snapshot_config[:headless]
37
39
  @localize_simulator = snapshot_config[:localize_simulator]
38
40
  @dark_mode = snapshot_config[:dark_mode]
39
41
  @reinstall_app = snapshot_config[:reinstall_app]
@@ -76,6 +76,11 @@ module Snapshot
76
76
  disable_slide_to_type(type)
77
77
  end
78
78
  end
79
+
80
+ unless launcher_config.headless
81
+ simulator_path = File.join(Helper.xcode_path, 'Applications', 'Simulator.app')
82
+ Helper.backticks("open -a #{simulator_path} -g", print: FastlaneCore::Globals.verbose?)
83
+ end
79
84
  end
80
85
 
81
86
  # pass an array of device types
@@ -42,6 +42,7 @@ require 'spaceship/connect_api/models/app_price'
42
42
  require 'spaceship/connect_api/models/app_price_tier'
43
43
  require 'spaceship/connect_api/models/app_store_review_attachment'
44
44
  require 'spaceship/connect_api/models/app_store_review_detail'
45
+ require 'spaceship/connect_api/models/app_store_version_release_request'
45
46
  require 'spaceship/connect_api/models/app_store_version_submission'
46
47
  require 'spaceship/connect_api/models/app_screenshot_set'
47
48
  require 'spaceship/connect_api/models/app_screenshot'
@@ -88,8 +88,8 @@ module Spaceship
88
88
  handle_response(response)
89
89
  end
90
90
 
91
- def post(url_or_path, body)
92
- response = with_asc_retry do
91
+ def post(url_or_path, body, tries: 5)
92
+ response = with_asc_retry(tries) do
93
93
  request(:post) do |req|
94
94
  req.url(url_or_path)
95
95
  req.body = body.to_json
@@ -129,7 +129,6 @@ module Spaceship
129
129
  tries = 1 if Object.const_defined?("SpecHelper")
130
130
  response = yield
131
131
 
132
- tries -= 1
133
132
  status = response.status if response
134
133
 
135
134
  if [500, 504].include?(status)
@@ -139,6 +138,7 @@ module Spaceship
139
138
 
140
139
  return response
141
140
  rescue => error
141
+ tries -= 1
142
142
  puts(error) if Spaceship::Globals.verbose?
143
143
  if tries.zero?
144
144
  return response
@@ -8,6 +8,7 @@ module Spaceship
8
8
  end
9
9
 
10
10
  attr_accessor :id
11
+ attr_accessor :reverse_attr_map
11
12
 
12
13
  def initialize(id, attributes)
13
14
  self.id = id
@@ -29,6 +30,7 @@ module Spaceship
29
30
  # Creates alias for :minOsVersion to :min_os_version
30
31
  #
31
32
  def attr_mapping(attr_map)
33
+ self.reverse_attr_map ||= attr_map.invert.each_with_object({}) { |(k, v), memo| memo[k.to_sym] = v; }
32
34
  attr_map.each do |key, value|
33
35
  # Actual
34
36
  reader = value.to_sym
@@ -50,6 +52,18 @@ module Spaceship
50
52
  end
51
53
  end
52
54
 
55
+ def reverse_attr_mapping(attributes)
56
+ return nil if attributes.nil?
57
+
58
+ # allows for getting map from either an instance or class execution
59
+ map = self.reverse_attr_map || self.class.reverse_attr_map
60
+
61
+ attributes.each_with_object({}) do |(k, v), memo|
62
+ key = map[k.to_sym] || k.to_sym
63
+ memo[key] = v
64
+ end
65
+ end
66
+
53
67
  def to_json(*options)
54
68
  instance_variables.map do |var|
55
69
  [var.to_s[1..-1], instance_variable_get(var)]
@@ -106,6 +106,7 @@ module Spaceship
106
106
  #
107
107
 
108
108
  def update(attributes: nil)
109
+ attributes = reverse_attr_mapping(attributes)
109
110
  Spaceship::ConnectAPI.patch_age_rating_declaration(age_rating_declaration_id: id, attributes: attributes)
110
111
  end
111
112
  end
@@ -12,9 +12,8 @@ module Spaceship
12
12
  attr_accessor :primary_locale
13
13
  attr_accessor :removed
14
14
  attr_accessor :is_aag
15
-
15
+ attr_accessor :available_in_new_territories
16
16
  attr_accessor :content_rights_declaration
17
-
18
17
  attr_accessor :app_store_versions
19
18
 
20
19
  module ContentRightsDeclaration
@@ -29,6 +28,7 @@ module Spaceship
29
28
  "primaryLocale" => "primary_locale",
30
29
  "removed" => "removed",
31
30
  "isAAG" => "is_aag",
31
+ "availableInNewTerritories" => "available_in_new_territories",
32
32
 
33
33
  "contentRightsDeclaration" => "content_rights_declaration",
34
34
 
@@ -71,6 +71,7 @@ module Spaceship
71
71
  end
72
72
 
73
73
  def update(attributes: nil, app_price_tier_id: nil, territory_ids: nil)
74
+ attributes = reverse_attr_mapping(attributes)
74
75
  return Spaceship::ConnectAPI.patch_app(app_id: id, attributes: attributes, app_price_tier_id: app_price_tier_id, territory_ids: territory_ids)
75
76
  end
76
77
 
@@ -78,6 +79,21 @@ module Spaceship
78
79
  # App Info
79
80
  #
80
81
 
82
+ def fetch_live_app_info(includes: Spaceship::ConnectAPI::AppInfo::ESSENTIAL_INCLUDES)
83
+ states = [
84
+ Spaceship::ConnectAPI::AppInfo::AppStoreState::READY_FOR_SALE,
85
+ Spaceship::ConnectAPI::AppInfo::AppStoreState::PENDING_DEVELOPER_RELEASE,
86
+ Spaceship::ConnectAPI::AppInfo::AppStoreState::PROCESSING_FOR_APP_STORE,
87
+ Spaceship::ConnectAPI::AppInfo::AppStoreState::IN_REVIEW
88
+ ]
89
+
90
+ filter = { app: id }
91
+ resp = Spaceship::ConnectAPI.get_app_infos(filter: filter, includes: includes)
92
+ return resp.to_models.select do |model|
93
+ states.include?(model.app_store_state)
94
+ end.first
95
+ end
96
+
81
97
  def fetch_edit_app_info(includes: Spaceship::ConnectAPI::AppInfo::ESSENTIAL_INCLUDES)
82
98
  states = [
83
99
  Spaceship::ConnectAPI::AppInfo::AppStoreState::PREPARE_FOR_SUBMISSION,
@@ -95,6 +111,16 @@ module Spaceship
95
111
  end.first
96
112
  end
97
113
 
114
+ #
115
+ # Available Territories
116
+ #
117
+
118
+ def fetch_available_territories(filter: {}, includes: nil, limit: nil, sort: nil)
119
+ filter ||= {}
120
+ resps = Spaceship::ConnectAPI.get_available_territories(app_id: id, filter: filter, includes: includes, limit: limit, sort: sort).all_pages
121
+ return resps.flat_map(&:to_models)
122
+ end
123
+
98
124
  #
99
125
  # App Pricing
100
126
  #
@@ -152,10 +178,22 @@ module Spaceship
152
178
  end
153
179
  end
154
180
 
181
+ def get_latest_app_store_version(platform: nil, includes: nil)
182
+ platform ||= Spaceship::ConnectAPI::Platform::IOS
183
+ filter = {
184
+ platform: platform
185
+ }
186
+
187
+ # Get the latest version
188
+ return get_app_store_versions(filter: filter, includes: includes)
189
+ .sort_by { |v| Gem::Version.new(v.version_string) }
190
+ .last
191
+ end
192
+
155
193
  def get_live_app_store_version(platform: nil, includes: nil)
156
194
  platform ||= Spaceship::ConnectAPI::Platform::IOS
157
195
  filter = {
158
- appStoreState: [Spaceship::ConnectAPI::AppStoreVersion::AppStoreState::READY_FOR_SALE].join(","),
196
+ appStoreState: Spaceship::ConnectAPI::AppStoreVersion::AppStoreState::READY_FOR_SALE,
159
197
  platform: platform
160
198
  }
161
199
  return get_app_store_versions(filter: filter, includes: includes).first
@@ -181,6 +219,24 @@ module Spaceship
181
219
  .last
182
220
  end
183
221
 
222
+ def get_in_review_app_store_version(platform: nil, includes: nil)
223
+ platform ||= Spaceship::ConnectAPI::Platform::IOS
224
+ filter = {
225
+ appStoreState: Spaceship::ConnectAPI::AppStoreVersion::AppStoreState::IN_REVIEW,
226
+ platform: platform
227
+ }
228
+ return get_app_store_versions(filter: filter, includes: includes).first
229
+ end
230
+
231
+ def get_pending_release_app_store_version(platform: nil, includes: nil)
232
+ platform ||= Spaceship::ConnectAPI::Platform::IOS
233
+ filter = {
234
+ appStoreState: Spaceship::ConnectAPI::AppStoreVersion::AppStoreState::PENDING_DEVELOPER_RELEASE,
235
+ platform: platform
236
+ }
237
+ return get_app_store_versions(filter: filter, includes: includes).first
238
+ end
239
+
184
240
  def get_app_store_versions(filter: {}, includes: nil, limit: nil, sort: nil)
185
241
  resps = Spaceship::ConnectAPI.get_app_store_versions(app_id: id, filter: filter, includes: includes, limit: limit, sort: sort).all_pages
186
242
  return resps.flat_map(&:to_models)
@@ -27,6 +27,7 @@ module Spaceship
27
27
  #
28
28
 
29
29
  def update(attributes: nil)
30
+ attributes = reverse_attr_mapping(attributes)
30
31
  Spaceship::ConnectAPI.patch_app_info_localization(app_info_localization_id: id, attributes: attributes)
31
32
  end
32
33
 
@@ -17,7 +17,7 @@ module Spaceship
17
17
  attr_accessor :video_url
18
18
  attr_accessor :preview_image
19
19
  attr_accessor :upload_operations
20
- attr_accessor :asset_deliver_state
20
+ attr_accessor :asset_delivery_state
21
21
  attr_accessor :upload
22
22
 
23
23
  attr_mapping({
@@ -70,7 +70,7 @@ module Spaceship
70
70
  preview = Spaceship::ConnectAPI.post_app_preview(
71
71
  app_preview_set_id: app_preview_set_id,
72
72
  attributes: post_attributes
73
- ).to_models.first
73
+ ).first
74
74
 
75
75
  # Upload the file
76
76
  upload_operations = preview.upload_operations
@@ -86,7 +86,7 @@ module Spaceship
86
86
  preview = Spaceship::ConnectAPI.patch_app_preview(
87
87
  app_preview_id: preview.id,
88
88
  attributes: patch_attributes
89
- ).to_models.first
89
+ ).first
90
90
  rescue => error
91
91
  puts("Failed to patch app preview. Update may have gone through so verifying") if Spaceship::Globals.verbose?
92
92
 
@@ -119,7 +119,8 @@ module Spaceship
119
119
  end
120
120
 
121
121
  def update(attributes: nil)
122
- Spaceship::ConnectAPI.patch_app_preview(app_preview_id: id, attributes: attributes)
122
+ attributes = reverse_attr_mapping(attributes)
123
+ Spaceship::ConnectAPI.patch_app_preview(app_preview_id: id, attributes: attributes).first
123
124
  end
124
125
 
125
126
  def delete!(filter: {}, includes: nil, limit: nil, sort: nil)
@@ -1,5 +1,6 @@
1
1
  require_relative '../model'
2
2
  require_relative '../file_uploader'
3
+ require_relative './app_screenshot_set'
3
4
  require 'spaceship/globals'
4
5
 
5
6
  require 'digest/md5'
@@ -9,6 +10,7 @@ module Spaceship
9
10
  class AppScreenshot
10
11
  include Spaceship::ConnectAPI::Model
11
12
 
13
+ attr_accessor :file_size
12
14
  attr_accessor :file_name
13
15
  attr_accessor :source_file_checksum
14
16
  attr_accessor :image_asset
@@ -19,6 +21,7 @@ module Spaceship
19
21
  attr_accessor :uploaded
20
22
 
21
23
  attr_mapping({
24
+ "fileSize" => "file_size",
22
25
  "fileName" => "file_name",
23
26
  "sourceFileChecksum" => "source_file_checksum",
24
27
  "imageAsset" => "image_asset",
@@ -33,6 +36,10 @@ module Spaceship
33
36
  return "appScreenshots"
34
37
  end
35
38
 
39
+ def awaiting_upload?
40
+ (asset_delivery_state || {})["state"] == "AWAITING_UPLOAD"
41
+ end
42
+
36
43
  def complete?
37
44
  (asset_delivery_state || {})["state"] == "COMPLETE"
38
45
  end
@@ -84,11 +91,43 @@ module Spaceship
84
91
  fileName: filename
85
92
  }
86
93
 
87
- # Create placeholder
88
- screenshot = Spaceship::ConnectAPI.post_app_screenshot(
89
- app_screenshot_set_id: app_screenshot_set_id,
90
- attributes: post_attributes
91
- ).first
94
+ # Create placeholder to upload screenshot
95
+ begin
96
+ screenshot = Spaceship::ConnectAPI.post_app_screenshot(
97
+ app_screenshot_set_id: app_screenshot_set_id,
98
+ attributes: post_attributes
99
+ ).first
100
+ rescue => error
101
+ # Sometimes creating a screenshot with the web session App Store Connect API
102
+ # will result in a false failure. The response will return a 503 but the database
103
+ # insert will eventually go through.
104
+ #
105
+ # When this is observed, we will poll until we find the matchin screenshot that
106
+ # is awaiting for upload and file size
107
+ #
108
+ # https://github.com/fastlane/fastlane/pull/16842
109
+ time = Time.now.to_i
110
+
111
+ timeout_minutes = (ENV["SPACESHIP_SCREENSHOT_UPLOAD_TIMEOUT"] || 20).to_i
112
+
113
+ loop do
114
+ puts("Waiting for screenshot to appear before uploading...")
115
+ sleep(30)
116
+
117
+ screenshots = Spaceship::ConnectAPI::AppScreenshotSet
118
+ .get(app_screenshot_set_id: app_screenshot_set_id)
119
+ .app_screenshots
120
+
121
+ screenshot = screenshots.find do |s|
122
+ s.awaiting_upload? && s.file_size == filesize
123
+ end
124
+
125
+ break if screenshot
126
+
127
+ time_diff = Time.now.to_i - time
128
+ raise error if time_diff >= (60 * timeout_minutes)
129
+ end
130
+ end
92
131
 
93
132
  # Upload the file
94
133
  upload_operations = screenshot.upload_operations
@@ -39,6 +39,7 @@ module Spaceship
39
39
  #
40
40
 
41
41
  def update(attributes: nil)
42
+ attributes = reverse_attr_mapping(attributes)
42
43
  return Spaceship::ConnectAPI.patch_app_store_review_detail(app_store_review_detail_id: id, attributes: attributes)
43
44
  end
44
45
 
@@ -1,4 +1,5 @@
1
1
  require_relative '../model'
2
+ require_relative './app_store_review_detail'
2
3
  require_relative './app_store_version_localization'
3
4
 
4
5
  module Spaceship
@@ -85,6 +86,7 @@ module Spaceship
85
86
  end
86
87
 
87
88
  def update(attributes: nil)
89
+ attributes = reverse_attr_mapping(attributes)
88
90
  return Spaceship::ConnectAPI.patch_app_store_version(app_store_version_id: id, attributes: attributes).first
89
91
  end
90
92
 
@@ -118,6 +120,7 @@ module Spaceship
118
120
  #
119
121
 
120
122
  def create_app_store_review_detail(attributes: nil)
123
+ attributes = Spaceship::ConnectAPI::AppStoreReviewDetail.reverse_attr_mapping(attributes)
121
124
  resp = Spaceship::ConnectAPI.post_app_store_review_detail(app_store_version_id: id, attributes: attributes)
122
125
  return resp.to_models.first
123
126
  end
@@ -155,6 +158,15 @@ module Spaceship
155
158
  return resp.to_models.first
156
159
  end
157
160
 
161
+ #
162
+ # App Store Version Release Requests
163
+ #
164
+
165
+ def create_app_store_version_release_request
166
+ resp = Spaceship::ConnectAPI.post_app_store_version_release_request(app_store_version_id: id)
167
+ return resp.to_models.first
168
+ end
169
+
158
170
  #
159
171
  # Build
160
172
  #