spaceship 0.3.2 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +18 -15
- data/lib/spaceship/base.rb +0 -1
- data/lib/spaceship/client.rb +80 -74
- data/lib/spaceship/helper/net_http_generic_request.rb +1 -1
- data/lib/spaceship/launcher.rb +19 -14
- data/lib/spaceship/portal/app.rb +23 -9
- data/lib/spaceship/portal/app_group.rb +77 -0
- data/lib/spaceship/portal/app_service.rb +222 -0
- data/lib/spaceship/portal/certificate.rb +2 -2
- data/lib/spaceship/portal/device.rb +7 -7
- data/lib/spaceship/portal/portal.rb +3 -1
- data/lib/spaceship/portal/portal_base.rb +1 -1
- data/lib/spaceship/portal/portal_client.rb +64 -11
- data/lib/spaceship/portal/provisioning_profile.rb +28 -54
- data/lib/spaceship/portal/spaceship.rb +27 -9
- data/lib/spaceship/portal/ui/select_team.rb +6 -8
- data/lib/spaceship/tunes/app_screenshot.rb +1 -1
- data/lib/spaceship/tunes/app_status.rb +5 -6
- data/lib/spaceship/tunes/app_submission.rb +25 -24
- data/lib/spaceship/tunes/app_version.rb +31 -41
- data/lib/spaceship/tunes/application.rb +27 -28
- data/lib/spaceship/tunes/build.rb +6 -7
- data/lib/spaceship/tunes/build_train.rb +2 -2
- data/lib/spaceship/tunes/language_converter.rb +14 -13
- data/lib/spaceship/tunes/language_item.rb +1 -1
- data/lib/spaceship/tunes/processing_build.rb +1 -1
- data/lib/spaceship/tunes/spaceship.rb +5 -5
- data/lib/spaceship/tunes/tester.rb +14 -15
- data/lib/spaceship/tunes/tunes_client.rb +61 -61
- data/lib/spaceship/ui.rb +1 -2
- data/lib/spaceship/version.rb +2 -2
- data/lib/spaceship.rb +2 -1
- metadata +19 -3
|
@@ -8,30 +8,30 @@ module Spaceship
|
|
|
8
8
|
# Authenticates with Apple's web services. This method has to be called once
|
|
9
9
|
# to generate a valid session. The session will automatically be used from then
|
|
10
10
|
# on.
|
|
11
|
-
#
|
|
11
|
+
#
|
|
12
12
|
# This method will automatically use the username from the Appfile (if available)
|
|
13
13
|
# and fetch the password from the Keychain (if available)
|
|
14
|
-
#
|
|
14
|
+
#
|
|
15
15
|
# @param user (String) (optional): The username (usually the email address)
|
|
16
16
|
# @param password (String) (optional): The password
|
|
17
|
-
#
|
|
17
|
+
#
|
|
18
18
|
# @raise InvalidUserCredentialsError: raised if authentication failed
|
|
19
|
-
#
|
|
19
|
+
#
|
|
20
20
|
# @return (Spaceship::Client) The client the login method was called for
|
|
21
21
|
def login(user = nil, password = nil)
|
|
22
22
|
@client = PortalClient.login(user, password)
|
|
23
23
|
end
|
|
24
24
|
|
|
25
25
|
# Open up the team selection for the user (if necessary).
|
|
26
|
-
#
|
|
26
|
+
#
|
|
27
27
|
# If the user is in multiple teams, a team selection is shown.
|
|
28
28
|
# The user can then select a team by entering the number
|
|
29
|
-
#
|
|
29
|
+
#
|
|
30
30
|
# Additionally, the team ID is shown next to each team name
|
|
31
31
|
# so that the user can use the environment variable `FASTLANE_TEAM_ID`
|
|
32
32
|
# for future user.
|
|
33
|
-
#
|
|
34
|
-
# @return (String) The ID of the select team. You also get the value if
|
|
33
|
+
#
|
|
34
|
+
# @return (String) The ID of the select team. You also get the value if
|
|
35
35
|
# the user is only in one team.
|
|
36
36
|
def select_team
|
|
37
37
|
@client.select_team
|
|
@@ -44,6 +44,16 @@ module Spaceship
|
|
|
44
44
|
Spaceship::App.set_client(@client)
|
|
45
45
|
end
|
|
46
46
|
|
|
47
|
+
# @return (Class) Access the app groups for the spaceship
|
|
48
|
+
def app_group
|
|
49
|
+
Spaceship::AppGroup.set_client(@client)
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
# @return (Class) Access app services for the spaceship
|
|
53
|
+
def app_service
|
|
54
|
+
Spaceship::AppService
|
|
55
|
+
end
|
|
56
|
+
|
|
47
57
|
# @return (Class) Access the devices for the spaceship
|
|
48
58
|
def device
|
|
49
59
|
Spaceship::Device.set_client(@client)
|
|
@@ -75,6 +85,14 @@ module Spaceship
|
|
|
75
85
|
Spaceship::Portal.app
|
|
76
86
|
end
|
|
77
87
|
|
|
88
|
+
def app_group
|
|
89
|
+
Spaceship::Portal.app_group
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
def app_service
|
|
93
|
+
Spaceship::Portal.app_service
|
|
94
|
+
end
|
|
95
|
+
|
|
78
96
|
def device
|
|
79
97
|
Spaceship::Portal.device
|
|
80
98
|
end
|
|
@@ -91,4 +109,4 @@ module Spaceship
|
|
|
91
109
|
Spaceship::Portal.client
|
|
92
110
|
end
|
|
93
111
|
end
|
|
94
|
-
end
|
|
112
|
+
end
|
|
@@ -8,11 +8,11 @@ module Spaceship
|
|
|
8
8
|
# "type"=>"Company/Organization",
|
|
9
9
|
# "extendedTeamAttributes"=>{},
|
|
10
10
|
# "teamAgent"=>{
|
|
11
|
-
# "personId"=>15534241111,
|
|
12
|
-
# "firstName"=>"Felix",
|
|
13
|
-
# "lastName"=>"Krause",
|
|
14
|
-
# "email"=>"spaceship@krausefx.com",
|
|
15
|
-
# "developerStatus"=>"active",
|
|
11
|
+
# "personId"=>15534241111,
|
|
12
|
+
# "firstName"=>"Felix",
|
|
13
|
+
# "lastName"=>"Krause",
|
|
14
|
+
# "email"=>"spaceship@krausefx.com",
|
|
15
|
+
# "developerStatus"=>"active",
|
|
16
16
|
# "teamMemberId"=>"5Y354CXAAA"},
|
|
17
17
|
# "memberships"=>
|
|
18
18
|
# [{"membershipId"=>"HJ5WHYC5CE",
|
|
@@ -57,10 +57,8 @@ module Spaceship
|
|
|
57
57
|
puts "Couldn't find team with Name '#{team_name}'"
|
|
58
58
|
end
|
|
59
59
|
|
|
60
|
-
|
|
61
60
|
return teams[0]['teamId'] if teams.count == 1 # user is just in one team
|
|
62
61
|
|
|
63
|
-
|
|
64
62
|
# User Selection
|
|
65
63
|
loop do
|
|
66
64
|
# Multiple teams, user has to select
|
|
@@ -77,4 +75,4 @@ module Spaceship
|
|
|
77
75
|
end
|
|
78
76
|
end
|
|
79
77
|
end
|
|
80
|
-
end
|
|
78
|
+
end
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
module Spaceship
|
|
2
2
|
module Tunes
|
|
3
3
|
# Defines the different states of the app
|
|
4
|
-
#
|
|
4
|
+
#
|
|
5
5
|
# As specified by Apple: https://developer.apple.com/library/ios/documentation/LanguagesUtilities/Conceptual/iTunesConnect_Guide/Chapters/ChangingAppStatus.html
|
|
6
6
|
module AppStatus
|
|
7
7
|
# You can edit this version, upload new binaries and more
|
|
@@ -23,7 +23,7 @@ module Spaceship
|
|
|
23
23
|
DEVELOPER_REMOVED_FROM_SALE = "Developer Removed From Sale"
|
|
24
24
|
|
|
25
25
|
# Developer rejected this version/binary
|
|
26
|
-
DEVELOPER_REJECTED = "Developer Rejected"
|
|
26
|
+
DEVELOPER_REJECTED = "Developer Rejected"
|
|
27
27
|
|
|
28
28
|
# You have to renew your Apple account to keep using iTunes Connect
|
|
29
29
|
PENDING_CONTRACT = "Pending Contract"
|
|
@@ -34,13 +34,12 @@ module Spaceship
|
|
|
34
34
|
|
|
35
35
|
# Unused app states
|
|
36
36
|
# PENDING_APPLE_RELASE = "Pending Apple Release"
|
|
37
|
-
|
|
37
|
+
|
|
38
38
|
# WAITING_FOR_EXPORT_COMPLIANCE = "Waiting For Export Compliance"
|
|
39
39
|
# METADATA_REJECTED = "Metadata Rejected"
|
|
40
40
|
# REMOVED_FROM_SALE = "Removed From Sale"
|
|
41
41
|
# INVALID_BINARY = "Invalid Binary"
|
|
42
42
|
|
|
43
|
-
|
|
44
43
|
# Get the app status matching based on a string (given by iTunes Connect)
|
|
45
44
|
def self.get_from_string(text)
|
|
46
45
|
mapping = {
|
|
@@ -52,7 +51,7 @@ module Spaceship
|
|
|
52
51
|
'waitingForReview' => WAITING_FOR_REVIEW
|
|
53
52
|
}
|
|
54
53
|
|
|
55
|
-
mapping.each do |k, v|
|
|
54
|
+
mapping.each do |k, v|
|
|
56
55
|
return v if k == text
|
|
57
56
|
end
|
|
58
57
|
|
|
@@ -60,4 +59,4 @@ module Spaceship
|
|
|
60
59
|
end
|
|
61
60
|
end
|
|
62
61
|
end
|
|
63
|
-
end
|
|
62
|
+
end
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
|
|
1
2
|
module Spaceship
|
|
2
3
|
module Tunes
|
|
3
4
|
# Represents a submission for review of an iTunes Connect Application
|
|
@@ -9,61 +10,61 @@ module Spaceship
|
|
|
9
10
|
|
|
10
11
|
# @return (AppVersion) The version to use for this submission
|
|
11
12
|
attr_accessor :version
|
|
12
|
-
|
|
13
|
+
|
|
13
14
|
# @return (String) The stage of this submission (start, complete)
|
|
14
15
|
attr_accessor :stage
|
|
15
|
-
|
|
16
|
+
|
|
16
17
|
# @return (Boolean) Submitted for Review
|
|
17
18
|
attr_accessor :submitted_for_review
|
|
18
19
|
|
|
19
20
|
# @return (Boolean) Ad ID Info - Limits ads tracking
|
|
20
21
|
attr_accessor :add_id_info_limits_tracking
|
|
21
|
-
|
|
22
|
+
|
|
22
23
|
# @return (Boolean) Ad ID Info - Serves ads
|
|
23
24
|
attr_accessor :add_id_info_serves_ads
|
|
24
|
-
|
|
25
|
+
|
|
25
26
|
# @return (Boolean) Ad ID Info - Tracks actions
|
|
26
27
|
attr_accessor :add_id_info_tracks_action
|
|
27
|
-
|
|
28
|
+
|
|
28
29
|
# @return (Boolean) Ad ID Info - Tracks installs
|
|
29
30
|
attr_accessor :add_id_info_tracks_install
|
|
30
|
-
|
|
31
|
+
|
|
31
32
|
# @return (Boolean) Ad ID Info - Uses idfa
|
|
32
33
|
attr_accessor :add_id_info_uses_idfa
|
|
33
|
-
|
|
34
|
+
|
|
34
35
|
# @return (Boolean) Content Rights - Contains third party content
|
|
35
36
|
attr_accessor :content_rights_contains_third_party_content
|
|
36
|
-
|
|
37
|
+
|
|
37
38
|
# @return (Boolean) Content Rights - Has rights of content
|
|
38
39
|
attr_accessor :content_rights_has_rights
|
|
39
|
-
|
|
40
|
+
|
|
40
41
|
# @return (Boolean) Export Compliance - Available on French Store
|
|
41
42
|
attr_accessor :export_compliance_available_on_french_store
|
|
42
|
-
|
|
43
|
-
# @return (
|
|
43
|
+
|
|
44
|
+
# @return (Not Yet Implemented) Export Compliance - CCAT File
|
|
44
45
|
attr_accessor :export_compliance_ccat_file
|
|
45
|
-
|
|
46
|
+
|
|
46
47
|
# @return (Boolean) Export Compliance - Contains proprietary cryptography
|
|
47
48
|
attr_accessor :export_compliance_contains_proprietary_cryptography
|
|
48
|
-
|
|
49
|
+
|
|
49
50
|
# @return (Boolean) Export Compliance - Contains third-party cryptography
|
|
50
51
|
attr_accessor :export_compliance_contains_third_party_cryptography
|
|
51
|
-
|
|
52
|
+
|
|
52
53
|
# @return (Boolean) Export Compliance - Is exempt
|
|
53
54
|
attr_accessor :export_compliance_is_exempt
|
|
54
|
-
|
|
55
|
+
|
|
55
56
|
# @return (Boolean) Export Compliance - Uses encryption
|
|
56
57
|
attr_accessor :export_compliance_uses_encryption
|
|
57
58
|
|
|
58
59
|
# @return (String) Export Compliance - App type
|
|
59
60
|
attr_accessor :export_compliance_app_type
|
|
60
|
-
|
|
61
|
+
|
|
61
62
|
# @return (Boolean) Export Compliance - Encryption Updated
|
|
62
63
|
attr_accessor :export_compliance_encryption_updated
|
|
63
|
-
|
|
64
|
+
|
|
64
65
|
# @return (Boolean) Export Compliance - Compliance Required
|
|
65
66
|
attr_accessor :export_compliance_compliance_required
|
|
66
|
-
|
|
67
|
+
|
|
67
68
|
# @return (String) Export Compliance - Platform
|
|
68
69
|
attr_accessor :export_compliance_platform
|
|
69
70
|
|
|
@@ -75,11 +76,11 @@ module Spaceship
|
|
|
75
76
|
'adIdInfo.tracksAction.value' => :add_id_info_tracks_action,
|
|
76
77
|
'adIdInfo.tracksInstall.value' => :add_id_info_tracks_install,
|
|
77
78
|
'adIdInfo.usesIdfa.value' => :add_id_info_uses_idfa,
|
|
78
|
-
|
|
79
|
+
|
|
79
80
|
# Content Rights Section
|
|
80
81
|
'contentRights.containsThirdPartyContent.value' => :content_rights_contains_third_party_content,
|
|
81
82
|
'contentRights.hasRights.value' => :content_rights_has_rights,
|
|
82
|
-
|
|
83
|
+
|
|
83
84
|
# Export Compliance Section
|
|
84
85
|
'exportCompliance.availableOnFrenchStore.value' => :export_compliance_available_on_french_store,
|
|
85
86
|
'exportCompliance.ccatFile.value' => :export_compliance_ccat_file,
|
|
@@ -98,7 +99,7 @@ module Spaceship
|
|
|
98
99
|
# This is used to create a new object based on the server response.
|
|
99
100
|
def factory(attrs)
|
|
100
101
|
orig = attrs.dup
|
|
101
|
-
|
|
102
|
+
|
|
102
103
|
# fill content rights section if iTC returns nil
|
|
103
104
|
if attrs["contentRights"].nil?
|
|
104
105
|
attrs.merge!("contentRights" => {
|
|
@@ -110,11 +111,11 @@ module Spaceship
|
|
|
110
111
|
}
|
|
111
112
|
})
|
|
112
113
|
end
|
|
113
|
-
|
|
114
|
+
|
|
114
115
|
obj = self.new(attrs)
|
|
115
116
|
return obj
|
|
116
117
|
end
|
|
117
|
-
|
|
118
|
+
|
|
118
119
|
# @param application (Spaceship::Tunes::Application) The app this submission is for
|
|
119
120
|
# @param app_id (String) The unique Apple ID of this app
|
|
120
121
|
def create(application, app_id, version)
|
|
@@ -127,7 +128,7 @@ module Spaceship
|
|
|
127
128
|
return self.factory(attrs)
|
|
128
129
|
end
|
|
129
130
|
end
|
|
130
|
-
|
|
131
|
+
|
|
131
132
|
# Save and complete the app submission
|
|
132
133
|
def complete!
|
|
133
134
|
@stage = "complete"
|
|
@@ -69,9 +69,6 @@ module Spaceship
|
|
|
69
69
|
# @return (Integer) a unqiue ID for this version generated by iTunes Connect
|
|
70
70
|
attr_accessor :version_id
|
|
71
71
|
|
|
72
|
-
# @return TODO
|
|
73
|
-
attr_accessor :company_information
|
|
74
|
-
|
|
75
72
|
####
|
|
76
73
|
# App Review Information
|
|
77
74
|
####
|
|
@@ -127,7 +124,6 @@ module Spaceship
|
|
|
127
124
|
# @return (Hash) Represents the screenshots of this app version (read-only)
|
|
128
125
|
attr_reader :screenshots
|
|
129
126
|
|
|
130
|
-
|
|
131
127
|
attr_mapping({
|
|
132
128
|
'canBetaTest' => :can_beta_test,
|
|
133
129
|
'canPrepareForUpload' => :can_prepare_for_upload,
|
|
@@ -232,7 +228,6 @@ module Spaceship
|
|
|
232
228
|
"https://itunesconnect.apple.com/WebObjects/iTunesConnect.woa/ra/ng/app/#{self.application.apple_id}/" + (self.is_live? ? "cur" : "")
|
|
233
229
|
end
|
|
234
230
|
|
|
235
|
-
|
|
236
231
|
# Private methods
|
|
237
232
|
def setup
|
|
238
233
|
# Properly parse the AppStatus
|
|
@@ -247,7 +242,6 @@ module Spaceship
|
|
|
247
242
|
end
|
|
248
243
|
end
|
|
249
244
|
|
|
250
|
-
|
|
251
245
|
# Prefill name, keywords, etc...
|
|
252
246
|
def unfold_languages
|
|
253
247
|
{
|
|
@@ -274,64 +268,60 @@ module Spaceship
|
|
|
274
268
|
end
|
|
275
269
|
|
|
276
270
|
def primary_category=(value)
|
|
277
|
-
value = "MZGenre.#{value}" unless value.include?"MZGenre"
|
|
278
|
-
super(value)
|
|
279
|
-
end
|
|
280
|
-
|
|
281
|
-
def primary_category=(value)
|
|
282
|
-
value = "MZGenre.#{value}" unless value.include?"MZGenre"
|
|
271
|
+
value = "MZGenre.#{value}" unless value.include? "MZGenre"
|
|
283
272
|
super(value)
|
|
284
273
|
end
|
|
285
274
|
|
|
286
|
-
def
|
|
287
|
-
value = "MZGenre.#{value}" unless value.include?"MZGenre"
|
|
275
|
+
def primary_first_sub_category=(value)
|
|
276
|
+
value = "MZGenre.#{value}" unless value.include? "MZGenre"
|
|
288
277
|
super(value)
|
|
289
278
|
end
|
|
290
279
|
|
|
291
|
-
def
|
|
292
|
-
value = "MZGenre.#{value}" unless value.include?"MZGenre"
|
|
280
|
+
def primary_second_sub_category=(value)
|
|
281
|
+
value = "MZGenre.#{value}" unless value.include? "MZGenre"
|
|
293
282
|
super(value)
|
|
294
283
|
end
|
|
295
284
|
|
|
296
285
|
def secondary_category=(value)
|
|
297
|
-
value = "MZGenre.#{value}" unless value.include?"MZGenre"
|
|
286
|
+
value = "MZGenre.#{value}" unless value.include? "MZGenre"
|
|
298
287
|
super(value)
|
|
299
288
|
end
|
|
300
289
|
|
|
301
|
-
def
|
|
302
|
-
value = "MZGenre.#{value}" unless value.include?"MZGenre"
|
|
290
|
+
def secondary_first_sub_category=(value)
|
|
291
|
+
value = "MZGenre.#{value}" unless value.include? "MZGenre"
|
|
303
292
|
super(value)
|
|
304
293
|
end
|
|
305
294
|
|
|
306
|
-
def
|
|
307
|
-
value = "MZGenre.#{value}" unless value.include?"MZGenre"
|
|
295
|
+
def secondary_second_sub_category=(value)
|
|
296
|
+
value = "MZGenre.#{value}" unless value.include? "MZGenre"
|
|
308
297
|
super(value)
|
|
309
298
|
end
|
|
310
299
|
|
|
311
300
|
private
|
|
301
|
+
|
|
312
302
|
# generates the nested data structure to represent screenshots
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
end
|
|
303
|
+
def setup_screenshots(row)
|
|
304
|
+
screenshots = row.fetch('screenshots', {}).fetch('value', nil)
|
|
305
|
+
return [] unless screenshots
|
|
306
|
+
|
|
307
|
+
result = []
|
|
308
|
+
|
|
309
|
+
screenshots.each do |device_type, value|
|
|
310
|
+
value['value'].each do |screenshot|
|
|
311
|
+
screenshot = screenshot['value']
|
|
312
|
+
result << Tunes::AppScreenshot.new({
|
|
313
|
+
url: screenshot['url'],
|
|
314
|
+
thumbnail_url: screenshot['thumbNailUrl'],
|
|
315
|
+
sort_order: screenshot['sortOrder'],
|
|
316
|
+
original_file_name: screenshot['originalFileName'],
|
|
317
|
+
device_type: device_type,
|
|
318
|
+
language: row['language']
|
|
319
|
+
})
|
|
331
320
|
end
|
|
332
|
-
|
|
333
|
-
return result
|
|
334
321
|
end
|
|
322
|
+
|
|
323
|
+
return result
|
|
324
|
+
end
|
|
335
325
|
end
|
|
336
326
|
end
|
|
337
327
|
end
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
module Spaceship
|
|
2
2
|
module Tunes
|
|
3
3
|
class Application < TunesBase
|
|
4
|
-
|
|
4
|
+
|
|
5
5
|
# @return (String) The App identifier of this app, provided by iTunes Connect
|
|
6
|
-
# @example
|
|
6
|
+
# @example
|
|
7
7
|
# "1013943394"
|
|
8
8
|
attr_accessor :apple_id
|
|
9
9
|
|
|
@@ -13,17 +13,17 @@ module Spaceship
|
|
|
13
13
|
attr_accessor :name
|
|
14
14
|
|
|
15
15
|
# @return (String) the supported platform of this app
|
|
16
|
-
# @example
|
|
16
|
+
# @example
|
|
17
17
|
# "ios"
|
|
18
18
|
attr_accessor :platform
|
|
19
19
|
|
|
20
20
|
# @return (String) The Vendor ID provided by iTunes Connect
|
|
21
|
-
# @example
|
|
21
|
+
# @example
|
|
22
22
|
# "1435592086"
|
|
23
23
|
attr_accessor :vendor_id
|
|
24
24
|
|
|
25
25
|
# @return (String) The bundle_id (app identifier) of your app
|
|
26
|
-
# @example
|
|
26
|
+
# @example
|
|
27
27
|
# "com.krausefx.app"
|
|
28
28
|
attr_accessor :bundle_id
|
|
29
29
|
|
|
@@ -34,7 +34,7 @@ module Spaceship
|
|
|
34
34
|
attr_accessor :issues_count
|
|
35
35
|
|
|
36
36
|
# @return (String) The URL to a low resolution app icon of this app (340x340px). Might be nil
|
|
37
|
-
# @example
|
|
37
|
+
# @example
|
|
38
38
|
# "https://is1-ssl.mzstatic.com/image/thumb/Purple7/v4/cd/a3/e2/cda3e2ac-4034-c6af-ee0c-3e4d9a0bafaa/pr_source.png/340x340bb-80.png"
|
|
39
39
|
# @example
|
|
40
40
|
# nil
|
|
@@ -50,7 +50,7 @@ module Spaceship
|
|
|
50
50
|
'issuesCount' => :issues_count,
|
|
51
51
|
'iconUrl' => :app_icon_preview_url
|
|
52
52
|
)
|
|
53
|
-
|
|
53
|
+
|
|
54
54
|
class << self
|
|
55
55
|
# Create a new object based on a hash.
|
|
56
56
|
# This is used to create a new object based on the server response.
|
|
@@ -72,22 +72,22 @@ module Spaceship
|
|
|
72
72
|
end
|
|
73
73
|
|
|
74
74
|
# Creates a new application on iTunes Connect
|
|
75
|
-
# @param name (String): The name of your app as it will appear on the App Store.
|
|
75
|
+
# @param name (String): The name of your app as it will appear on the App Store.
|
|
76
76
|
# This can't be longer than 255 characters.
|
|
77
|
-
# @param primary_language (String): If localized app information isn't available in an
|
|
77
|
+
# @param primary_language (String): If localized app information isn't available in an
|
|
78
78
|
# App Store territory, the information from your primary language will be used instead.
|
|
79
|
-
# @param version (String): The version number is shown on the App Store and should
|
|
79
|
+
# @param version (String): The version number is shown on the App Store and should
|
|
80
80
|
# match the one you used in Xcode.
|
|
81
81
|
# @param sku (String): A unique ID for your app that is not visible on the App Store.
|
|
82
|
-
# @param bundle_id (String): The bundle ID must match the one you used in Xcode. It
|
|
82
|
+
# @param bundle_id (String): The bundle ID must match the one you used in Xcode. It
|
|
83
83
|
# can't be changed after you submit your first build.
|
|
84
84
|
# @param company_name (String): The company name or developer name to display on the App Store for your apps.
|
|
85
85
|
# It cannot be changed after you create your first app.
|
|
86
86
|
def create!(name: nil, primary_language: nil, version: nil, sku: nil, bundle_id: nil, bundle_id_suffix: nil, company_name: nil)
|
|
87
|
-
client.create_application!(name: name,
|
|
88
|
-
primary_language: primary_language,
|
|
89
|
-
version: version,
|
|
90
|
-
sku: sku,
|
|
87
|
+
client.create_application!(name: name,
|
|
88
|
+
primary_language: primary_language,
|
|
89
|
+
version: version,
|
|
90
|
+
sku: sku,
|
|
91
91
|
bundle_id: bundle_id,
|
|
92
92
|
bundle_id_suffix: bundle_id_suffix,
|
|
93
93
|
company_name: company_name)
|
|
@@ -99,7 +99,7 @@ module Spaceship
|
|
|
99
99
|
#####################################################
|
|
100
100
|
|
|
101
101
|
# @return (Spaceship::AppVersion) Receive the version that is currently live on the
|
|
102
|
-
# App Store. You can't modify all values there, so be careful.
|
|
102
|
+
# App Store. You can't modify all values there, so be careful.
|
|
103
103
|
def live_version
|
|
104
104
|
v = Spaceship::AppVersion.find(self, self.apple_id, true)
|
|
105
105
|
end
|
|
@@ -127,7 +127,7 @@ module Spaceship
|
|
|
127
127
|
"https://itunesconnect.apple.com/WebObjects/iTunesConnect.woa/ra/ng/app/#{self.apple_id}"
|
|
128
128
|
end
|
|
129
129
|
|
|
130
|
-
# @return (Hash) Contains the reason for rejection.
|
|
130
|
+
# @return (Hash) Contains the reason for rejection.
|
|
131
131
|
# if everything is alright, the result will be
|
|
132
132
|
# `{"sectionErrorKeys"=>[], "sectionInfoKeys"=>[], "sectionWarningKeys"=>[], "replyConstraints"=>{"minLength"=>1, "maxLength"=>4000}, "appNotes"=>{"threads"=>[]}, "betaNotes"=>{"threads"=>[]}, "appMessages"=>{"threads"=>[]}}`
|
|
133
133
|
def resolution_center
|
|
@@ -137,8 +137,10 @@ module Spaceship
|
|
|
137
137
|
#####################################################
|
|
138
138
|
# @!group Modifying
|
|
139
139
|
#####################################################
|
|
140
|
-
|
|
140
|
+
|
|
141
141
|
# Create a new version of your app
|
|
142
|
+
# Since we have stored the outdated raw_data, we need to refresh this object
|
|
143
|
+
# otherwise `edit_version` will return nil
|
|
142
144
|
def create_version!(version_number)
|
|
143
145
|
if edit_version
|
|
144
146
|
raise "Cannot create a new version for this app as there already is an `edit_version` available"
|
|
@@ -146,9 +148,7 @@ module Spaceship
|
|
|
146
148
|
|
|
147
149
|
client.create_version!(apple_id, version_number)
|
|
148
150
|
|
|
149
|
-
#
|
|
150
|
-
# otherwise `edit_version` will return nil
|
|
151
|
-
# TODO: implemented -reload method
|
|
151
|
+
# Future: implemented -reload method
|
|
152
152
|
end
|
|
153
153
|
|
|
154
154
|
#####################################################
|
|
@@ -166,7 +166,7 @@ module Spaceship
|
|
|
166
166
|
# Those builds can also be the builds that are stuck on iTC.
|
|
167
167
|
def pre_processing_builds
|
|
168
168
|
data = client.build_trains(apple_id) # we need to fetch all trains here to get the builds
|
|
169
|
-
|
|
169
|
+
|
|
170
170
|
data.fetch('processingBuilds', []).collect do |attrs|
|
|
171
171
|
attrs.merge!(build_train: self)
|
|
172
172
|
Tunes::ProcessingBuild.factory(attrs)
|
|
@@ -177,7 +177,7 @@ module Spaceship
|
|
|
177
177
|
# this include pre-processing or standard processing
|
|
178
178
|
def all_processing_builds
|
|
179
179
|
builds = self.pre_processing_builds
|
|
180
|
-
|
|
180
|
+
|
|
181
181
|
self.build_trains.each do |version_number, train|
|
|
182
182
|
train.processing_builds.each do |build|
|
|
183
183
|
builds << build
|
|
@@ -203,13 +203,13 @@ module Spaceship
|
|
|
203
203
|
#####################################################
|
|
204
204
|
# @!group Submit for Review
|
|
205
205
|
#####################################################
|
|
206
|
-
|
|
206
|
+
|
|
207
207
|
def create_submission
|
|
208
208
|
version = self.latest_version
|
|
209
209
|
if version.nil?
|
|
210
210
|
raise "Could not find a valid version to submit for review"
|
|
211
211
|
end
|
|
212
|
-
|
|
212
|
+
|
|
213
213
|
Spaceship::AppSubmission.create(self, self.apple_id, version)
|
|
214
214
|
end
|
|
215
215
|
|
|
@@ -229,7 +229,6 @@ module Spaceship
|
|
|
229
229
|
# @!group General
|
|
230
230
|
#####################################################
|
|
231
231
|
def setup
|
|
232
|
-
|
|
233
232
|
end
|
|
234
233
|
|
|
235
234
|
#####################################################
|
|
@@ -273,8 +272,8 @@ module Spaceship
|
|
|
273
272
|
def add_external_tester!(email: nil, first_name: nil, last_name: nil)
|
|
274
273
|
raise "Tester is already on #{self.name} betatesters" if find_external_tester(email)
|
|
275
274
|
|
|
276
|
-
tester = Tunes::Tester.external.find(email) || Tunes::Tester.external.create!(email: email,
|
|
277
|
-
first_name: first_name,
|
|
275
|
+
tester = Tunes::Tester.external.find(email) || Tunes::Tester.external.create!(email: email,
|
|
276
|
+
first_name: first_name,
|
|
278
277
|
last_name: last_name)
|
|
279
278
|
tester.add_to_app!(self.apple_id)
|
|
280
279
|
end
|
|
@@ -6,7 +6,7 @@ module Spaceship
|
|
|
6
6
|
#####################################################
|
|
7
7
|
# @!group General metadata
|
|
8
8
|
#####################################################
|
|
9
|
-
|
|
9
|
+
|
|
10
10
|
# @return (Spaceship::Tunes::BuildTrain) A reference to the build train this build is contained in
|
|
11
11
|
attr_accessor :build_train
|
|
12
12
|
|
|
@@ -44,11 +44,10 @@ module Spaceship
|
|
|
44
44
|
# this is only true after the build was approved by Apple
|
|
45
45
|
attr_accessor :external_testing_enabled
|
|
46
46
|
|
|
47
|
-
|
|
48
47
|
# @return (Bool) Does this build support WatchKit?
|
|
49
48
|
attr_accessor :watch_kit_enabled
|
|
50
49
|
|
|
51
|
-
# @return (Bool):
|
|
50
|
+
# @return (Bool):
|
|
52
51
|
attr_accessor :ready_to_install
|
|
53
52
|
|
|
54
53
|
#####################################################
|
|
@@ -88,7 +87,7 @@ module Spaceship
|
|
|
88
87
|
'internalExpiry' => :internal_expiry_date,
|
|
89
88
|
'externalExpiry' => :external_expiry_date,
|
|
90
89
|
'watchKitEnabled' => :watch_kit_enabled,
|
|
91
|
-
'readyToInstall' => :ready_to_install
|
|
90
|
+
'readyToInstall' => :ready_to_install
|
|
92
91
|
)
|
|
93
92
|
|
|
94
93
|
class << self
|
|
@@ -129,9 +128,9 @@ module Spaceship
|
|
|
129
128
|
def submit_for_beta_review!(metadata)
|
|
130
129
|
# First, enable beta testing for this train (per iTC requirement)
|
|
131
130
|
self.build_train.update_testing_status!(true)
|
|
132
|
-
|
|
131
|
+
|
|
133
132
|
parameters = {
|
|
134
|
-
app_id: self.build_train.application.apple_id,
|
|
133
|
+
app_id: self.build_train.application.apple_id,
|
|
135
134
|
train: self.build_train.version_string,
|
|
136
135
|
build_number: self.build_version,
|
|
137
136
|
|
|
@@ -182,7 +181,7 @@ module Spaceship
|
|
|
182
181
|
|
|
183
182
|
# This will cancel the review process for this TestFlight build
|
|
184
183
|
def cancel_beta_review!
|
|
185
|
-
client.remove_testflight_build_from_review!(app_id: self.build_train.application.apple_id,
|
|
184
|
+
client.remove_testflight_build_from_review!(app_id: self.build_train.application.apple_id,
|
|
186
185
|
train: self.build_train.version_string,
|
|
187
186
|
build_number: self.build_version)
|
|
188
187
|
end
|
|
@@ -54,7 +54,7 @@ module Spaceship
|
|
|
54
54
|
# Setup all the builds and processing builds
|
|
55
55
|
def setup
|
|
56
56
|
super
|
|
57
|
-
|
|
57
|
+
|
|
58
58
|
@builds = self.raw_data['builds'].collect do |attrs|
|
|
59
59
|
attrs.merge!(build_train: self)
|
|
60
60
|
Tunes::Build.factory(attrs)
|
|
@@ -78,4 +78,4 @@ module Spaceship
|
|
|
78
78
|
end
|
|
79
79
|
end
|
|
80
80
|
end
|
|
81
|
-
end
|
|
81
|
+
end
|