fastlane 2.150.0.rc1 → 2.150.0.rc6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/deliver/lib/deliver/download_screenshots.rb +48 -26
- data/deliver/lib/deliver/runner.rb +0 -17
- data/deliver/lib/deliver/submit_for_review.rb +79 -32
- data/deliver/lib/deliver/upload_metadata.rb +92 -21
- data/deliver/lib/deliver/upload_price_tier.rb +9 -2
- data/deliver/lib/deliver/upload_screenshots.rb +61 -9
- 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/docs/upload_to_app_store.md.erb +78 -85
- data/fastlane/lib/fastlane/actions/set_changelog.rb +23 -20
- data/fastlane/lib/fastlane/version.rb +1 -1
- data/fastlane/swift/FastlaneSwiftRunner/FastlaneSwiftRunner.xcodeproj/project.xcworkspace/xcuserdata/josh.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
- data/fastlane_core/lib/fastlane_core/build_watcher.rb +4 -4
- data/fastlane_core/lib/fastlane_core/itunes_transporter.rb +89 -52
- data/pilot/lib/pilot/.manager.rb.swp +0 -0
- data/produce/lib/produce/itunes_connect.rb +43 -5
- data/spaceship/lib/spaceship/client.rb +4 -3
- data/spaceship/lib/spaceship/connect_api.rb +5 -1
- data/spaceship/lib/spaceship/{.DS_Store → connect_api/.DS_Store} +0 -0
- data/spaceship/lib/spaceship/connect_api/client.rb +50 -20
- data/spaceship/lib/spaceship/connect_api/file_uploader.rb +98 -0
- data/spaceship/lib/spaceship/connect_api/models/age_rating_declaration.rb +6 -2
- data/spaceship/lib/spaceship/connect_api/models/app.rb +35 -13
- data/spaceship/lib/spaceship/connect_api/models/app_info.rb +4 -11
- data/spaceship/lib/spaceship/connect_api/models/app_preview.rb +129 -0
- data/spaceship/lib/spaceship/connect_api/models/app_preview_set.rb +71 -0
- data/spaceship/lib/spaceship/connect_api/models/app_review_attachment.rb +18 -28
- data/spaceship/lib/spaceship/connect_api/models/app_screenshot.rb +88 -59
- data/spaceship/lib/spaceship/connect_api/models/app_screenshot_set.rb +26 -2
- data/spaceship/lib/spaceship/connect_api/models/app_store_version.rb +1 -0
- data/spaceship/lib/spaceship/connect_api/models/app_store_version_localization.rb +16 -0
- data/spaceship/lib/spaceship/connect_api/models/territory.rb +27 -0
- data/spaceship/lib/spaceship/connect_api/models/user.rb +2 -1
- data/spaceship/lib/spaceship/connect_api/tunes/tunes.rb +215 -74
- data/spaceship/lib/spaceship/connect_api/users/users.rb +13 -0
- metadata +16 -7
@@ -39,8 +39,24 @@ module Spaceship
|
|
39
39
|
APP_WATCH_SERIES_3 = "APP_WATCH_SERIES_3"
|
40
40
|
APP_WATCH_SERIES_4 = "APP_WATCH_SERIES_4"
|
41
41
|
|
42
|
+
APP_APPLE_TV = "APP_APPLE_TV"
|
43
|
+
|
42
44
|
APP_DESKTOP = "APP_DESKTOP"
|
43
45
|
|
46
|
+
ALL_IMESSAGE = [
|
47
|
+
IMESSAGE_APP_IPHONE_40,
|
48
|
+
IMESSAGE_APP_IPHONE_47,
|
49
|
+
IMESSAGE_APP_IPHONE_55,
|
50
|
+
IMESSAGE_APP_IPHONE_58,
|
51
|
+
IMESSAGE_APP_IPHONE_65,
|
52
|
+
|
53
|
+
IMESSAGE_APP_IPAD_97,
|
54
|
+
IMESSAGE_APP_IPAD_105,
|
55
|
+
IMESSAGE_APP_IPAD_PRO_129,
|
56
|
+
IMESSAGE_APP_IPAD_PRO_3GEN_11,
|
57
|
+
IMESSAGE_APP_IPAD_PRO_3GEN_129
|
58
|
+
]
|
59
|
+
|
44
60
|
ALL = [
|
45
61
|
APP_IPHONE_35,
|
46
62
|
APP_IPHONE_40,
|
@@ -84,6 +100,14 @@ module Spaceship
|
|
84
100
|
return "appScreenshotSets"
|
85
101
|
end
|
86
102
|
|
103
|
+
def apple_tv?
|
104
|
+
DisplayType::APP_APPLE_TV == screenshot_display_type
|
105
|
+
end
|
106
|
+
|
107
|
+
def imessage?
|
108
|
+
DisplayType::ALL_IMESSAGE.include?(screenshot_display_type)
|
109
|
+
end
|
110
|
+
|
87
111
|
#
|
88
112
|
# API
|
89
113
|
#
|
@@ -93,8 +117,8 @@ module Spaceship
|
|
93
117
|
return resp.to_models
|
94
118
|
end
|
95
119
|
|
96
|
-
def upload_screenshot(path: nil)
|
97
|
-
return Spaceship::ConnectAPI::AppScreenshot.create(app_screenshot_set_id: id, path: path)
|
120
|
+
def upload_screenshot(path: nil, wait_for_processing: true)
|
121
|
+
return Spaceship::ConnectAPI::AppScreenshot.create(app_screenshot_set_id: id, path: path, wait_for_processing: wait_for_processing)
|
98
122
|
end
|
99
123
|
end
|
100
124
|
end
|
@@ -1,4 +1,5 @@
|
|
1
1
|
require_relative '../model'
|
2
|
+
require_relative './app_preview_set'
|
2
3
|
require_relative './app_screenshot_set'
|
3
4
|
|
4
5
|
module Spaceship
|
@@ -51,6 +52,21 @@ module Spaceship
|
|
51
52
|
Spaceship::ConnectAPI.delete_app_store_version_localization(app_store_version_localization_id: id)
|
52
53
|
end
|
53
54
|
|
55
|
+
#
|
56
|
+
# App Preview Sets
|
57
|
+
#
|
58
|
+
|
59
|
+
def get_app_preview_sets(filter: {}, includes: "appPreviews", limit: nil, sort: nil)
|
60
|
+
filter ||= {}
|
61
|
+
filter["appStoreVersionLocalization"] = id
|
62
|
+
return Spaceship::ConnectAPI::AppPreviewSet.all(filter: filter, includes: includes, limit: limit, sort: sort)
|
63
|
+
end
|
64
|
+
|
65
|
+
def create_app_preview_set(attributes: nil)
|
66
|
+
resp = Spaceship::ConnectAPI.post_app_preview_set(app_store_version_localization_id: id, attributes: attributes)
|
67
|
+
return resp.to_models.first
|
68
|
+
end
|
69
|
+
|
54
70
|
#
|
55
71
|
# App Screenshot Sets
|
56
72
|
#
|
@@ -0,0 +1,27 @@
|
|
1
|
+
require_relative '../model'
|
2
|
+
module Spaceship
|
3
|
+
class ConnectAPI
|
4
|
+
class Territory
|
5
|
+
include Spaceship::ConnectAPI::Model
|
6
|
+
|
7
|
+
attr_accessor :currency
|
8
|
+
|
9
|
+
attr_mapping({
|
10
|
+
"currency" => "currency"
|
11
|
+
})
|
12
|
+
|
13
|
+
def self.type
|
14
|
+
return "territories"
|
15
|
+
end
|
16
|
+
|
17
|
+
#
|
18
|
+
# API
|
19
|
+
#
|
20
|
+
|
21
|
+
def self.all(filter: {}, includes: nil, limit: 180, sort: nil)
|
22
|
+
resps = Spaceship::ConnectAPI.get_territories(filter: {}, includes: nil, limit: nil, sort: nil).all_pages
|
23
|
+
return resps.flat_map(&:to_models)
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
@@ -39,7 +39,8 @@ module Spaceship
|
|
39
39
|
#
|
40
40
|
|
41
41
|
def self.all(filter: {}, includes: nil, limit: nil, sort: nil)
|
42
|
-
|
42
|
+
resps = Spaceship::ConnectAPI.get_users(filter: filter, includes: includes).all_pages
|
43
|
+
return resps.flat_map(&:to_models)
|
43
44
|
end
|
44
45
|
|
45
46
|
def self.find(email: nil, includes: nil)
|
@@ -28,7 +28,7 @@ module Spaceship
|
|
28
28
|
# app
|
29
29
|
#
|
30
30
|
|
31
|
-
def post_app(name: nil, version_string: nil, sku: nil, primary_locale: nil, bundle_id: nil, platforms: nil)
|
31
|
+
def post_app(name: nil, version_string: nil, sku: nil, primary_locale: nil, bundle_id: nil, platforms: nil, company_name: nil)
|
32
32
|
included = []
|
33
33
|
included << {
|
34
34
|
type: "appInfos",
|
@@ -89,91 +89,175 @@ module Spaceship
|
|
89
89
|
}
|
90
90
|
end
|
91
91
|
|
92
|
+
relationships = {
|
93
|
+
appStoreVersions: {
|
94
|
+
data: app_store_verions_data
|
95
|
+
},
|
96
|
+
appInfos: {
|
97
|
+
data: [
|
98
|
+
{
|
99
|
+
type: "appInfos",
|
100
|
+
id: "${new-appInfo-id}"
|
101
|
+
}
|
102
|
+
]
|
103
|
+
}
|
104
|
+
}
|
105
|
+
|
106
|
+
app_attributes = {
|
107
|
+
sku: sku,
|
108
|
+
primaryLocale: primary_locale,
|
109
|
+
bundleId: bundle_id
|
110
|
+
}
|
111
|
+
app_attributes[:companyName] = company_name if company_name
|
112
|
+
|
92
113
|
body = {
|
93
114
|
data: {
|
94
115
|
type: "apps",
|
116
|
+
attributes: app_attributes,
|
117
|
+
relationships: relationships
|
118
|
+
},
|
119
|
+
included: included
|
120
|
+
}
|
121
|
+
|
122
|
+
Client.instance.post("apps", body)
|
123
|
+
end
|
124
|
+
|
125
|
+
def patch_app(app_id: nil, attributes: {}, app_price_tier_id: nil, territory_ids: nil)
|
126
|
+
relationships = {}
|
127
|
+
included = []
|
128
|
+
|
129
|
+
# Price tier
|
130
|
+
unless app_price_tier_id.nil?
|
131
|
+
relationships[:prices] = {
|
132
|
+
data: [
|
133
|
+
{
|
134
|
+
type: "appPrices",
|
135
|
+
id: "${price1}"
|
136
|
+
}
|
137
|
+
]
|
138
|
+
}
|
139
|
+
|
140
|
+
included << {
|
141
|
+
type: "appPrices",
|
142
|
+
id: "${price1}",
|
95
143
|
attributes: {
|
96
|
-
|
97
|
-
primaryLocale: primary_locale,
|
98
|
-
bundleId: bundle_id
|
144
|
+
startDate: nil
|
99
145
|
},
|
100
146
|
relationships: {
|
101
|
-
|
102
|
-
data:
|
147
|
+
app: {
|
148
|
+
data: {
|
149
|
+
type: "apps",
|
150
|
+
id: app_id
|
151
|
+
}
|
103
152
|
},
|
104
|
-
|
105
|
-
data:
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
}
|
110
|
-
]
|
153
|
+
priceTier: {
|
154
|
+
data: {
|
155
|
+
type: "appPriceTiers",
|
156
|
+
id: app_price_tier_id.to_s
|
157
|
+
}
|
111
158
|
}
|
112
159
|
}
|
113
|
-
}
|
114
|
-
|
160
|
+
}
|
161
|
+
end
|
162
|
+
|
163
|
+
# Territories
|
164
|
+
territories_data = (territory_ids || []).map do |id|
|
165
|
+
{ type: "territories", id: id }
|
166
|
+
end
|
167
|
+
unless territories_data.empty?
|
168
|
+
relationships[:availableTerritories] = {
|
169
|
+
data: territories_data
|
170
|
+
}
|
171
|
+
end
|
172
|
+
|
173
|
+
# Data
|
174
|
+
data = {
|
175
|
+
type: "apps",
|
176
|
+
id: app_id
|
115
177
|
}
|
178
|
+
data[:attributes] = attributes unless attributes.empty?
|
179
|
+
data[:relationships] = relationships unless relationships.empty?
|
116
180
|
|
117
|
-
|
181
|
+
# Body
|
182
|
+
body = {
|
183
|
+
data: data
|
184
|
+
}
|
185
|
+
body[:included] = included unless included.empty?
|
186
|
+
|
187
|
+
Client.instance.patch("apps/#{app_id}", body)
|
188
|
+
end
|
189
|
+
|
190
|
+
#
|
191
|
+
# appPreview
|
192
|
+
#
|
193
|
+
|
194
|
+
def get_app_preview(app_preview_id: nil)
|
195
|
+
params = Client.instance.build_params(filter: nil, includes: nil, limit: nil, sort: nil)
|
196
|
+
Client.instance.get("appPreviews/#{app_preview_id}", params)
|
118
197
|
end
|
119
198
|
|
120
|
-
def
|
199
|
+
def post_app_preview(app_preview_set_id: nil, attributes: {})
|
121
200
|
body = {
|
122
201
|
data: {
|
123
|
-
type: "
|
124
|
-
|
202
|
+
type: "appPreviews",
|
203
|
+
attributes: attributes,
|
204
|
+
relationships: {
|
205
|
+
appPreviewSet: {
|
206
|
+
data: {
|
207
|
+
type: "appPreviewSets",
|
208
|
+
id: app_preview_set_id
|
209
|
+
}
|
210
|
+
}
|
211
|
+
}
|
212
|
+
}
|
213
|
+
}
|
214
|
+
|
215
|
+
Client.instance.post("appPreviews", body)
|
216
|
+
end
|
217
|
+
|
218
|
+
def patch_app_preview(app_preview_id: nil, attributes: {})
|
219
|
+
body = {
|
220
|
+
data: {
|
221
|
+
type: "appPreviews",
|
222
|
+
id: app_preview_id,
|
125
223
|
attributes: attributes
|
126
224
|
}
|
127
225
|
}
|
128
226
|
|
129
|
-
Client.instance.patch("
|
227
|
+
Client.instance.patch("appPreviews/#{app_preview_id}", body)
|
130
228
|
end
|
131
229
|
|
132
|
-
def
|
230
|
+
def delete_app_preview(app_preview_id: nil)
|
231
|
+
params = Client.instance.build_params(filter: nil, includes: nil, limit: nil, sort: nil)
|
232
|
+
Client.instance.delete("appPreviews/#{app_preview_id}", params)
|
233
|
+
end
|
234
|
+
|
235
|
+
#
|
236
|
+
# appPreviewSets
|
237
|
+
#
|
238
|
+
|
239
|
+
def get_app_preview_sets(filter: {}, includes: nil, limit: nil, sort: nil)
|
240
|
+
params = Client.instance.build_params(filter: filter, includes: includes, limit: limit, sort: sort)
|
241
|
+
Client.instance.get("appPreviewSets", params)
|
242
|
+
end
|
243
|
+
|
244
|
+
def post_app_preview_set(app_store_version_localization_id: nil, attributes: {})
|
133
245
|
body = {
|
134
246
|
data: {
|
135
|
-
type: "
|
136
|
-
|
137
|
-
attributes: {
|
138
|
-
availableInNewTerritories: true
|
139
|
-
},
|
247
|
+
type: "appPreviewSets",
|
248
|
+
attributes: attributes,
|
140
249
|
relationships: {
|
141
|
-
|
142
|
-
data:
|
143
|
-
|
144
|
-
|
145
|
-
id: "${price1}"
|
146
|
-
}
|
147
|
-
]
|
148
|
-
}
|
149
|
-
}
|
150
|
-
},
|
151
|
-
included: [
|
152
|
-
{
|
153
|
-
type: "appPrices",
|
154
|
-
id: "${price1}",
|
155
|
-
attributes: {
|
156
|
-
startDate: nil
|
157
|
-
},
|
158
|
-
relationships: {
|
159
|
-
app: {
|
160
|
-
data: {
|
161
|
-
type: "apps",
|
162
|
-
id: app_id
|
163
|
-
}
|
164
|
-
},
|
165
|
-
priceTier: {
|
166
|
-
data: {
|
167
|
-
type: "appPriceTiers",
|
168
|
-
id: app_price_tier_id.to_s
|
169
|
-
}
|
250
|
+
appStoreVersionLocalization: {
|
251
|
+
data: {
|
252
|
+
type: "appStoreVersionLocalizations",
|
253
|
+
id: app_store_version_localization_id
|
170
254
|
}
|
171
255
|
}
|
172
256
|
}
|
173
|
-
|
257
|
+
}
|
174
258
|
}
|
175
259
|
|
176
|
-
Client.instance.
|
260
|
+
Client.instance.post("appPreviewSets", body)
|
177
261
|
end
|
178
262
|
|
179
263
|
#
|
@@ -262,6 +346,11 @@ module Spaceship
|
|
262
346
|
# appScreenshots
|
263
347
|
#
|
264
348
|
|
349
|
+
def get_app_screenshot(app_screenshot_id: nil)
|
350
|
+
params = Client.instance.build_params(filter: nil, includes: nil, limit: nil, sort: nil)
|
351
|
+
Client.instance.get("appScreenshots/#{app_screenshot_id}", params)
|
352
|
+
end
|
353
|
+
|
265
354
|
def post_app_screenshot(app_screenshot_set_id: nil, attributes: {})
|
266
355
|
body = {
|
267
356
|
data: {
|
@@ -302,9 +391,9 @@ module Spaceship
|
|
302
391
|
# appInfos
|
303
392
|
#
|
304
393
|
|
305
|
-
def get_app_infos(
|
394
|
+
def get_app_infos(filter: {}, includes: nil, limit: nil, sort: nil)
|
306
395
|
params = Client.instance.build_params(filter: filter, includes: includes, limit: limit, sort: sort)
|
307
|
-
Client.instance.get("
|
396
|
+
Client.instance.get("appInfos", params)
|
308
397
|
end
|
309
398
|
|
310
399
|
def patch_app_info(app_info_id: nil, attributes: {})
|
@@ -323,27 +412,70 @@ module Spaceship
|
|
323
412
|
Client.instance.patch("appInfos/#{app_info_id}", body)
|
324
413
|
end
|
325
414
|
|
326
|
-
|
327
|
-
|
328
|
-
|
415
|
+
#
|
416
|
+
# Adding the key will create/update (if value) or delete if nil
|
417
|
+
# Not including a key will leave as is
|
418
|
+
# category_id_map: {
|
419
|
+
# primary_category_id: "GAMES",
|
420
|
+
# primary_subcategory_one_id: "PUZZLE",
|
421
|
+
# primary_subcategory_two_id: "STRATEGY",
|
422
|
+
# secondary_category_id: nil,
|
423
|
+
# secondary_subcategory_one_id: nil,
|
424
|
+
# secondary_subcategory_two_id: nil
|
425
|
+
# }
|
426
|
+
#
|
427
|
+
def patch_app_info_categories(app_info_id: nil, category_id_map: nil)
|
428
|
+
category_id_map ||= {}
|
429
|
+
primary_category_id = category_id_map[:primary_category_id]
|
430
|
+
primary_subcategory_one_id = category_id_map[:primary_subcategory_one_id]
|
431
|
+
primary_subcategory_two_id = category_id_map[:primary_subcategory_two_id]
|
432
|
+
secondary_category_id = category_id_map[:secondary_category_id]
|
433
|
+
secondary_subcategory_one_id = category_id_map[:secondary_subcategory_one_id]
|
434
|
+
secondary_subcategory_two_id = category_id_map[:secondary_subcategory_two_id]
|
435
|
+
|
436
|
+
relationships = {}
|
437
|
+
|
438
|
+
# Only update if key is included (otherwise category will be removed)
|
439
|
+
if category_id_map.include?(:primary_category_id)
|
440
|
+
relationships[:primaryCategory] = {
|
329
441
|
data: primary_category_id ? { type: "appCategories", id: primary_category_id } : nil
|
330
|
-
}
|
331
|
-
|
332
|
-
|
333
|
-
|
334
|
-
|
442
|
+
}
|
443
|
+
end
|
444
|
+
|
445
|
+
# Only update if key is included (otherwise category will be removed)
|
446
|
+
if category_id_map.include?(:primary_subcategory_one_id)
|
447
|
+
relationships[:primarySubcategoryOne] = {
|
335
448
|
data: primary_subcategory_one_id ? { type: "appCategories", id: primary_subcategory_one_id } : nil
|
336
|
-
}
|
337
|
-
|
449
|
+
}
|
450
|
+
end
|
451
|
+
|
452
|
+
# Only update if key is included (otherwise category will be removed)
|
453
|
+
if category_id_map.include?(:primary_subcategory_two_id)
|
454
|
+
relationships[:primarySubcategoryTwo] = {
|
338
455
|
data: primary_subcategory_two_id ? { type: "appCategories", id: primary_subcategory_two_id } : nil
|
339
|
-
}
|
340
|
-
|
456
|
+
}
|
457
|
+
end
|
458
|
+
|
459
|
+
# Only update if key is included (otherwise category will be removed)
|
460
|
+
if category_id_map.include?(:secondary_category_id)
|
461
|
+
relationships[:secondaryCategory] = {
|
462
|
+
data: secondary_category_id ? { type: "appCategories", id: secondary_category_id } : nil
|
463
|
+
}
|
464
|
+
end
|
465
|
+
|
466
|
+
# Only update if key is included (otherwise category will be removed)
|
467
|
+
if category_id_map.include?(:secondary_subcategory_one_id)
|
468
|
+
relationships[:secondarySubcategoryOne] = {
|
341
469
|
data: secondary_subcategory_one_id ? { type: "appCategories", id: secondary_subcategory_one_id } : nil
|
342
|
-
}
|
343
|
-
|
470
|
+
}
|
471
|
+
end
|
472
|
+
|
473
|
+
# Only update if key is included (otherwise category will be removed)
|
474
|
+
if category_id_map.include?(:secondary_subcategory_two_id)
|
475
|
+
relationships[:secondarySubcategoryTwo] = {
|
344
476
|
data: secondary_subcategory_two_id ? { type: "appCategories", id: secondary_subcategory_two_id } : nil
|
345
477
|
}
|
346
|
-
|
478
|
+
end
|
347
479
|
|
348
480
|
data = {
|
349
481
|
type: "appInfos",
|
@@ -698,6 +830,15 @@ module Spaceship
|
|
698
830
|
params = Client.instance.build_params(filter: nil, includes: nil, limit: nil, sort: nil)
|
699
831
|
Client.instance.delete("idfaDeclarations/#{idfa_declaration_id}", params)
|
700
832
|
end
|
833
|
+
|
834
|
+
#
|
835
|
+
# territories
|
836
|
+
#
|
837
|
+
|
838
|
+
def get_territories(filter: {}, includes: nil, limit: nil, sort: nil)
|
839
|
+
params = Client.instance.build_params(filter: nil, includes: nil, limit: nil, sort: nil)
|
840
|
+
Client.instance.get("territories", params)
|
841
|
+
end
|
701
842
|
end
|
702
843
|
end
|
703
844
|
end
|