fastlane 2.150.0.rc3 → 2.150.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +76 -76
- data/deliver/lib/deliver/download_screenshots.rb +48 -26
- data/deliver/lib/deliver/runner.rb +4 -1
- data/deliver/lib/deliver/submit_for_review.rb +26 -7
- data/deliver/lib/deliver/upload_metadata.rb +29 -10
- data/deliver/lib/deliver/upload_screenshots.rb +49 -10
- 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 +4 -0
- data/fastlane/lib/fastlane/version.rb +1 -1
- data/fastlane/swift/Deliverfile.swift +1 -1
- data/fastlane/swift/DeliverfileProtocol.swift +6 -6
- data/fastlane/swift/Fastlane.swift +22 -19
- data/fastlane/swift/FastlaneSwiftRunner/FastlaneSwiftRunner.xcodeproj/project.xcworkspace/xcuserdata/josh.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
- data/fastlane/swift/Gymfile.swift +1 -1
- data/fastlane/swift/Matchfile.swift +1 -1
- data/fastlane/swift/Precheckfile.swift +1 -1
- data/fastlane/swift/Scanfile.swift +1 -1
- data/fastlane/swift/Screengrabfile.swift +1 -1
- data/fastlane/swift/Snapshotfile.swift +1 -1
- data/fastlane/swift/SocketClient.swift +2 -1
- data/fastlane_core/lib/fastlane_core/build_watcher.rb +4 -4
- data/fastlane_core/lib/fastlane_core/ipa_file_analyser.rb +0 -1
- data/fastlane_core/lib/fastlane_core/itunes_transporter.rb +89 -52
- data/fastlane_core/lib/fastlane_core/provisioning_profile.rb +1 -1
- data/pilot/lib/pilot/.manager.rb.swp +0 -0
- data/produce/lib/produce/itunes_connect.rb +29 -2
- data/spaceship/lib/spaceship/{.DS_Store → connect_api/.DS_Store} +0 -0
- data/spaceship/lib/spaceship/connect_api/client.rb +1 -1
- data/spaceship/lib/spaceship/connect_api/file_uploader.rb +42 -10
- data/spaceship/lib/spaceship/connect_api/models/age_rating_declaration.rb +1 -1
- data/spaceship/lib/spaceship/connect_api/models/app.rb +46 -6
- data/spaceship/lib/spaceship/connect_api/models/app_info.rb +4 -0
- data/spaceship/lib/spaceship/connect_api/models/app_preview.rb +62 -10
- data/spaceship/lib/spaceship/connect_api/models/app_preview_set.rb +2 -2
- data/spaceship/lib/spaceship/connect_api/models/app_review_attachment.rb +18 -28
- data/spaceship/lib/spaceship/connect_api/models/app_screenshot.rb +86 -37
- data/spaceship/lib/spaceship/connect_api/models/app_screenshot_set.rb +32 -2
- data/spaceship/lib/spaceship/connect_api/models/app_store_review_detail.rb +5 -6
- data/spaceship/lib/spaceship/connect_api/models/app_store_version.rb +22 -3
- data/spaceship/lib/spaceship/connect_api/models/user.rb +2 -1
- data/spaceship/lib/spaceship/connect_api/tunes/tunes.rb +41 -13
- data/spaceship/lib/spaceship/connect_api/users/users.rb +13 -0
- metadata +37 -32
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8487fa83f02a3dc9dc73920e47fa8c8652d8870c1c591d644ee2138446d41b7d
|
4
|
+
data.tar.gz: 158f51047d36d16716f02af2f790c89f4015e50a28a404ec8122a98eacf4f83b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 482164ad088f8bc85cbbb31446a0e766c597d7fc50f5cd9d98888f176d15fcbdeaf16d0a54ca92cf72a73d55bcef6bdcc98a2a8c07b303430b374546d0f77225
|
7
|
+
data.tar.gz: 54fa6088bc3373a0d936999022b54050fbd1f82bab8cd6dce45e0403dee4a213d2f5d7f950f5bcaa83599e1dc24668e1d156ab213be15bd2904a1340b45ebea5
|
data/README.md
CHANGED
@@ -34,35 +34,35 @@ If the above doesn't help, please [submit an issue](https://github.com/fastlane/
|
|
34
34
|
<!-- This table is regenerated and resorted on each release -->
|
35
35
|
<table id='team'>
|
36
36
|
<tr>
|
37
|
-
<td id='iulian-onofrei'>
|
38
|
-
<a href='https://github.com/revolter'>
|
39
|
-
<img src='https://github.com/revolter.png?size=140'>
|
40
|
-
</a>
|
41
|
-
<h4 align='center'><a href='https://twitter.com/Revolt666'>Iulian Onofrei</a></h4>
|
42
|
-
</td>
|
43
|
-
<td id='stefan-natchev'>
|
44
|
-
<a href='https://github.com/snatchev'>
|
45
|
-
<img src='https://github.com/snatchev.png?size=140'>
|
46
|
-
</a>
|
47
|
-
<h4 align='center'><a href='https://twitter.com/snatchev'>Stefan Natchev</a></h4>
|
48
|
-
</td>
|
49
37
|
<td id='joshua-liebowitz'>
|
50
38
|
<a href='https://github.com/taquitos'>
|
51
39
|
<img src='https://github.com/taquitos.png?size=140'>
|
52
40
|
</a>
|
53
41
|
<h4 align='center'><a href='https://twitter.com/taquitos'>Joshua Liebowitz</a></h4>
|
54
42
|
</td>
|
43
|
+
<td id='matthew-ellis'>
|
44
|
+
<a href='https://github.com/matthewellis'>
|
45
|
+
<img src='https://github.com/matthewellis.png?size=140'>
|
46
|
+
</a>
|
47
|
+
<h4 align='center'><a href='https://twitter.com/mellis1995'>Matthew Ellis</a></h4>
|
48
|
+
</td>
|
55
49
|
<td id='helmut-januschka'>
|
56
50
|
<a href='https://github.com/hjanuschka'>
|
57
51
|
<img src='https://github.com/hjanuschka.png?size=140'>
|
58
52
|
</a>
|
59
53
|
<h4 align='center'><a href='https://twitter.com/hjanuschka'>Helmut Januschka</a></h4>
|
60
54
|
</td>
|
61
|
-
<td id='
|
62
|
-
<a href='https://github.com/
|
63
|
-
<img src='https://github.com/
|
55
|
+
<td id='josh-holtz'>
|
56
|
+
<a href='https://github.com/joshdholtz'>
|
57
|
+
<img src='https://github.com/joshdholtz.png?size=140'>
|
64
58
|
</a>
|
65
|
-
<h4 align='center'><a href='https://twitter.com/
|
59
|
+
<h4 align='center'><a href='https://twitter.com/joshdholtz'>Josh Holtz</a></h4>
|
60
|
+
</td>
|
61
|
+
<td id='max-ott'>
|
62
|
+
<a href='https://github.com/max-ott'>
|
63
|
+
<img src='https://github.com/max-ott.png?size=140'>
|
64
|
+
</a>
|
65
|
+
<h4 align='center'><a href='https://twitter.com/ott_max'>Max Ott</a></h4>
|
66
66
|
</td>
|
67
67
|
</tr>
|
68
68
|
<tr>
|
@@ -72,55 +72,23 @@ If the above doesn't help, please [submit an issue](https://github.com/fastlane/
|
|
72
72
|
</a>
|
73
73
|
<h4 align='center'><a href='https://twitter.com/lmirosevic'>Luka Mirosevic</a></h4>
|
74
74
|
</td>
|
75
|
-
<td id='
|
76
|
-
<a href='https://github.com/
|
77
|
-
<img src='https://github.com/
|
78
|
-
</a>
|
79
|
-
<h4 align='center'><a href='https://twitter.com/endocrimes'>Danielle Tomlinson</a></h4>
|
80
|
-
</td>
|
81
|
-
<td id='jan-piotrowski'>
|
82
|
-
<a href='https://github.com/janpio'>
|
83
|
-
<img src='https://github.com/janpio.png?size=140'>
|
84
|
-
</a>
|
85
|
-
<h4 align='center'><a href='https://twitter.com/Sujan'>Jan Piotrowski</a></h4>
|
86
|
-
</td>
|
87
|
-
<td id='aaron-brager'>
|
88
|
-
<a href='https://github.com/getaaron'>
|
89
|
-
<img src='https://github.com/getaaron.png?size=140'>
|
90
|
-
</a>
|
91
|
-
<h4 align='center'><a href='https://twitter.com/getaaron'>Aaron Brager</a></h4>
|
92
|
-
</td>
|
93
|
-
<td id='olivier-halligon'>
|
94
|
-
<a href='https://github.com/AliSoftware'>
|
95
|
-
<img src='https://github.com/AliSoftware.png?size=140'>
|
75
|
+
<td id='iulian-onofrei'>
|
76
|
+
<a href='https://github.com/revolter'>
|
77
|
+
<img src='https://github.com/revolter.png?size=140'>
|
96
78
|
</a>
|
97
|
-
<h4 align='center'><a href='https://twitter.com/
|
79
|
+
<h4 align='center'><a href='https://twitter.com/Revolt666'>Iulian Onofrei</a></h4>
|
98
80
|
</td>
|
99
|
-
</tr>
|
100
|
-
<tr>
|
101
81
|
<td id='jimmy-dee'>
|
102
82
|
<a href='https://github.com/jdee'>
|
103
83
|
<img src='https://github.com/jdee.png?size=140'>
|
104
84
|
</a>
|
105
85
|
<h4 align='center'>Jimmy Dee</h4>
|
106
86
|
</td>
|
107
|
-
<td id='
|
108
|
-
<a href='https://github.com/
|
109
|
-
<img src='https://github.com/
|
110
|
-
</a>
|
111
|
-
<h4 align='center'><a href='https://twitter.com/mollyIV'>Daniel Jankowski</a></h4>
|
112
|
-
</td>
|
113
|
-
<td id='felix-krause'>
|
114
|
-
<a href='https://github.com/KrauseFx'>
|
115
|
-
<img src='https://github.com/KrauseFx.png?size=140'>
|
116
|
-
</a>
|
117
|
-
<h4 align='center'><a href='https://twitter.com/KrauseFx'>Felix Krause</a></h4>
|
118
|
-
</td>
|
119
|
-
<td id='matthew-ellis'>
|
120
|
-
<a href='https://github.com/matthewellis'>
|
121
|
-
<img src='https://github.com/matthewellis.png?size=140'>
|
87
|
+
<td id='jérôme-lacoste'>
|
88
|
+
<a href='https://github.com/lacostej'>
|
89
|
+
<img src='https://github.com/lacostej.png?size=140'>
|
122
90
|
</a>
|
123
|
-
<h4 align='center'><a href='https://twitter.com/
|
91
|
+
<h4 align='center'><a href='https://twitter.com/lacostej'>Jérôme Lacoste</a></h4>
|
124
92
|
</td>
|
125
93
|
<td id='manu-wallner'>
|
126
94
|
<a href='https://github.com/milch'>
|
@@ -130,50 +98,82 @@ If the above doesn't help, please [submit an issue](https://github.com/fastlane/
|
|
130
98
|
</td>
|
131
99
|
</tr>
|
132
100
|
<tr>
|
133
|
-
<td id='
|
134
|
-
<a href='https://github.com/
|
135
|
-
<img src='https://github.com/
|
101
|
+
<td id='felix-krause'>
|
102
|
+
<a href='https://github.com/KrauseFx'>
|
103
|
+
<img src='https://github.com/KrauseFx.png?size=140'>
|
136
104
|
</a>
|
137
|
-
<h4 align='center'><a href='https://twitter.com/
|
105
|
+
<h4 align='center'><a href='https://twitter.com/KrauseFx'>Felix Krause</a></h4>
|
138
106
|
</td>
|
139
|
-
<td id='
|
140
|
-
<a href='https://github.com/
|
141
|
-
<img src='https://github.com/
|
107
|
+
<td id='jan-piotrowski'>
|
108
|
+
<a href='https://github.com/janpio'>
|
109
|
+
<img src='https://github.com/janpio.png?size=140'>
|
142
110
|
</a>
|
143
|
-
<h4 align='center'><a href='https://twitter.com/
|
111
|
+
<h4 align='center'><a href='https://twitter.com/Sujan'>Jan Piotrowski</a></h4>
|
144
112
|
</td>
|
145
|
-
<td id='
|
146
|
-
<a href='https://github.com/
|
147
|
-
<img src='https://github.com/
|
113
|
+
<td id='stefan-natchev'>
|
114
|
+
<a href='https://github.com/snatchev'>
|
115
|
+
<img src='https://github.com/snatchev.png?size=140'>
|
148
116
|
</a>
|
149
|
-
<h4 align='center'><a href='https://twitter.com/
|
117
|
+
<h4 align='center'><a href='https://twitter.com/snatchev'>Stefan Natchev</a></h4>
|
150
118
|
</td>
|
151
|
-
<td id='
|
152
|
-
<a href='https://github.com/
|
153
|
-
<img src='https://github.com/
|
119
|
+
<td id='olivier-halligon'>
|
120
|
+
<a href='https://github.com/AliSoftware'>
|
121
|
+
<img src='https://github.com/AliSoftware.png?size=140'>
|
154
122
|
</a>
|
155
|
-
<h4 align='center'><a href='https://twitter.com/
|
123
|
+
<h4 align='center'><a href='https://twitter.com/aligatr'>Olivier Halligon</a></h4>
|
156
124
|
</td>
|
157
|
-
<td id='
|
158
|
-
<a href='https://github.com/
|
159
|
-
<img src='https://github.com/
|
125
|
+
<td id='danielle-tomlinson'>
|
126
|
+
<a href='https://github.com/endocrimes'>
|
127
|
+
<img src='https://github.com/endocrimes.png?size=140'>
|
160
128
|
</a>
|
161
|
-
<h4 align='center'><a href='https://twitter.com/
|
129
|
+
<h4 align='center'><a href='https://twitter.com/endocrimes'>Danielle Tomlinson</a></h4>
|
162
130
|
</td>
|
163
131
|
</tr>
|
164
132
|
<tr>
|
133
|
+
<td id='aaron-brager'>
|
134
|
+
<a href='https://github.com/getaaron'>
|
135
|
+
<img src='https://github.com/getaaron.png?size=140'>
|
136
|
+
</a>
|
137
|
+
<h4 align='center'><a href='https://twitter.com/getaaron'>Aaron Brager</a></h4>
|
138
|
+
</td>
|
139
|
+
<td id='jorge-revuelta-h'>
|
140
|
+
<a href='https://github.com/minuscorp'>
|
141
|
+
<img src='https://github.com/minuscorp.png?size=140'>
|
142
|
+
</a>
|
143
|
+
<h4 align='center'><a href='https://twitter.com/minuscorp'>Jorge Revuelta H</a></h4>
|
144
|
+
</td>
|
165
145
|
<td id='maksym-grebenets'>
|
166
146
|
<a href='https://github.com/mgrebenets'>
|
167
147
|
<img src='https://github.com/mgrebenets.png?size=140'>
|
168
148
|
</a>
|
169
149
|
<h4 align='center'><a href='https://twitter.com/mgrebenets'>Maksym Grebenets</a></h4>
|
170
150
|
</td>
|
151
|
+
<td id='fumiya-nakamura'>
|
152
|
+
<a href='https://github.com/nafu'>
|
153
|
+
<img src='https://github.com/nafu.png?size=140'>
|
154
|
+
</a>
|
155
|
+
<h4 align='center'><a href='https://twitter.com/nafu003'>Fumiya Nakamura</a></h4>
|
156
|
+
</td>
|
157
|
+
<td id='andrew-mcburney'>
|
158
|
+
<a href='https://github.com/armcburney'>
|
159
|
+
<img src='https://github.com/armcburney.png?size=140'>
|
160
|
+
</a>
|
161
|
+
<h4 align='center'><a href='https://twitter.com/armcburney'>Andrew McBurney</a></h4>
|
162
|
+
</td>
|
163
|
+
</tr>
|
164
|
+
<tr>
|
171
165
|
<td id='kohki-miki'>
|
172
166
|
<a href='https://github.com/giginet'>
|
173
167
|
<img src='https://github.com/giginet.png?size=140'>
|
174
168
|
</a>
|
175
169
|
<h4 align='center'><a href='https://twitter.com/giginet'>Kohki Miki</a></h4>
|
176
170
|
</td>
|
171
|
+
<td id='daniel-jankowski'>
|
172
|
+
<a href='https://github.com/mollyIV'>
|
173
|
+
<img src='https://github.com/mollyIV.png?size=140'>
|
174
|
+
</a>
|
175
|
+
<h4 align='center'><a href='https://twitter.com/mollyIV'>Daniel Jankowski</a></h4>
|
176
|
+
</td>
|
177
177
|
</table>
|
178
178
|
|
179
179
|
Special thanks to all [contributors](https://github.com/fastlane/fastlane/graphs/contributors) for extending and improving _fastlane_.
|
@@ -1,4 +1,5 @@
|
|
1
1
|
require_relative 'module'
|
2
|
+
require 'spaceship'
|
2
3
|
require 'open-uri'
|
3
4
|
|
4
5
|
module Deliver
|
@@ -13,35 +14,56 @@ module Deliver
|
|
13
14
|
end
|
14
15
|
|
15
16
|
def self.download(options, folder_path)
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
screenshots.each do |screenshot|
|
20
|
-
file_name = [screenshot.sort_order, screenshot.device_type, screenshot.sort_order].join("_")
|
21
|
-
original_file_extension = File.basename(screenshot.original_file_name)
|
22
|
-
file_name += "." + original_file_extension
|
23
|
-
|
24
|
-
UI.message("Downloading existing screenshot '#{file_name}' for language '#{language}'")
|
25
|
-
|
26
|
-
# If the screen shot is for an appleTV we need to store it in a way that we'll know it's an appleTV
|
27
|
-
# screen shot later as the screen size is the same as an iPhone 6 Plus in landscape.
|
28
|
-
if screenshot.device_type == "appleTV"
|
29
|
-
containing_folder = File.join(folder_path, "appleTV", screenshot.language)
|
30
|
-
else
|
31
|
-
containing_folder = File.join(folder_path, screenshot.language)
|
32
|
-
end
|
17
|
+
legacy_app = options[:app]
|
18
|
+
app_id = legacy_app.apple_id
|
19
|
+
app = Spaceship::ConnectAPI::App.get(app_id: app_id)
|
33
20
|
|
34
|
-
|
35
|
-
|
36
|
-
|
21
|
+
platform = Spaceship::ConnectAPI::Platform.map(options[:platform])
|
22
|
+
if options[:use_live_version]
|
23
|
+
version = app.get_live_app_store_version(platform: platform)
|
24
|
+
UI.user_error!("Could not find a live version on App Store Connect. Try using '--use_live_version false'") if version.nil?
|
25
|
+
else
|
26
|
+
version = app.get_edit_app_store_version(platform: platform)
|
27
|
+
UI.user_error!("Could not find an edit version on App Store Connect. Try using '--use_live_version true'") if version.nil?
|
28
|
+
end
|
29
|
+
|
30
|
+
localizations = version.get_app_store_version_localizations
|
31
|
+
localizations.each do |localization|
|
32
|
+
screenshot_sets = localization.get_app_screenshot_sets
|
33
|
+
screenshot_sets.each do |screenshot_set|
|
34
|
+
screenshot_set.app_screenshots.each_with_index do |screenshot, index|
|
35
|
+
file_name = [index, screenshot_set.screenshot_display_type, index].join("_")
|
36
|
+
original_file_extension = File.extname(screenshot.file_name).strip.downcase[1..-1]
|
37
|
+
file_name += "." + original_file_extension
|
38
|
+
|
39
|
+
url = screenshot.image_asset_url(type: original_file_extension)
|
40
|
+
next if url.nil?
|
41
|
+
|
42
|
+
language = localization.locale
|
43
|
+
|
44
|
+
UI.message("Downloading existing screenshot '#{file_name}' for language '#{language}'")
|
45
|
+
|
46
|
+
# If the screen shot is for an appleTV we need to store it in a way that we'll know it's an appleTV
|
47
|
+
# screen shot later as the screen size is the same as an iPhone 6 Plus in landscape.
|
48
|
+
if screenshot_set.apple_tv?
|
49
|
+
containing_folder = File.join(folder_path, "appleTV", language)
|
50
|
+
else
|
51
|
+
containing_folder = File.join(folder_path, language)
|
52
|
+
end
|
53
|
+
|
54
|
+
if screenshot_set.imessage?
|
55
|
+
containing_folder = File.join(folder_path, "iMessage", language)
|
56
|
+
end
|
57
|
+
|
58
|
+
begin
|
59
|
+
FileUtils.mkdir_p(containing_folder)
|
60
|
+
rescue
|
61
|
+
# if it's already there
|
62
|
+
end
|
37
63
|
|
38
|
-
|
39
|
-
|
40
|
-
rescue
|
41
|
-
# if it's already there
|
64
|
+
path = File.join(containing_folder, file_name)
|
65
|
+
File.binwrite(path, open(url).read)
|
42
66
|
end
|
43
|
-
path = File.join(containing_folder, file_name)
|
44
|
-
File.binwrite(path, open(screenshot.url).read)
|
45
67
|
end
|
46
68
|
end
|
47
69
|
end
|
@@ -159,7 +159,10 @@ module Deliver
|
|
159
159
|
end
|
160
160
|
|
161
161
|
def reject_version_if_possible
|
162
|
-
|
162
|
+
legacy_app = options[:app]
|
163
|
+
app_id = legacy_app.apple_id
|
164
|
+
app = Spaceship::ConnectAPI::App.get(app_id: app_id)
|
165
|
+
|
163
166
|
if app.reject_version_if_possible!
|
164
167
|
UI.success("Successfully rejected previous version!")
|
165
168
|
end
|
@@ -59,6 +59,8 @@ module Deliver
|
|
59
59
|
|
60
60
|
def update_export_compliance(options, app, build)
|
61
61
|
submission_information = options[:submission_information] || {}
|
62
|
+
submission_information = submission_information.collect { |k, v| [k.to_sym, v] }.to_h
|
63
|
+
|
62
64
|
uses_encryption = submission_information[:export_compliance_uses_encryption]
|
63
65
|
|
64
66
|
if build.uses_non_exempt_encryption.nil?
|
@@ -70,6 +72,8 @@ module Deliver
|
|
70
72
|
"Add information to the :submission_information option...",
|
71
73
|
" Docs: http://docs.fastlane.tools/actions/deliver/#compliance-and-idfa-settings",
|
72
74
|
" Example: submission_information: { export_compliance_uses_encryption: false }",
|
75
|
+
" Example CLI:",
|
76
|
+
" --submission_information \"{\\\"export_compliance_uses_encryption\\\": false}\"",
|
73
77
|
"This can also be set in your Info.plist with key 'ITSAppUsesNonExemptEncryption'"
|
74
78
|
].join("\n")
|
75
79
|
UI.user_error!(message)
|
@@ -85,6 +89,8 @@ module Deliver
|
|
85
89
|
|
86
90
|
def update_idfa(options, app, version)
|
87
91
|
submission_information = options[:submission_information] || {}
|
92
|
+
submission_information = submission_information.collect { |k, v| [k.to_sym, v] }.to_h
|
93
|
+
|
88
94
|
uses_idfa = submission_information[:add_id_info_uses_idfa]
|
89
95
|
|
90
96
|
idfa_declaration = begin
|
@@ -93,14 +99,17 @@ module Deliver
|
|
93
99
|
nil
|
94
100
|
end
|
95
101
|
|
102
|
+
updated_idfa = false
|
103
|
+
|
96
104
|
# Set IDFA on version
|
97
|
-
UI.verbose("Updating app store version for IDFA status of '#{uses_idfa}'")
|
98
105
|
unless uses_idfa.nil?
|
106
|
+
UI.verbose("Updating app store version for IDFA status of '#{uses_idfa}'")
|
99
107
|
version = version.update(attributes: {
|
100
108
|
usesIdfa: uses_idfa
|
101
109
|
})
|
110
|
+
UI.verbose("Updated app store version for IDFA status of '#{version.uses_idfa}'")
|
111
|
+
updated_idfa = true
|
102
112
|
end
|
103
|
-
UI.verbose("Updated app store version for IDFA status of '#{version.uses_idfa}'")
|
104
113
|
|
105
114
|
# Error if uses_idfa not set
|
106
115
|
if version.uses_idfa.nil?
|
@@ -115,7 +124,9 @@ module Deliver
|
|
115
124
|
" add_id_info_serves_ads: false,",
|
116
125
|
" add_id_info_uses_idfa: false,",
|
117
126
|
" add_id_info_tracks_install: false",
|
118
|
-
" }"
|
127
|
+
" }",
|
128
|
+
" Example CLI:",
|
129
|
+
" --submission_information \"{\\\"add_id_info_uses_idfa\\\": false}\""
|
119
130
|
].join("\n")
|
120
131
|
UI.user_error!(message)
|
121
132
|
end
|
@@ -125,6 +136,7 @@ module Deliver
|
|
125
136
|
if idfa_declaration
|
126
137
|
UI.verbose("Deleting IDFA delcaration")
|
127
138
|
idfa_declaration.delete!
|
139
|
+
updated_idfa = true
|
128
140
|
UI.verbose("Deleted IDFA delcaration")
|
129
141
|
end
|
130
142
|
elsif uses_idfa == true
|
@@ -144,13 +156,16 @@ module Deliver
|
|
144
156
|
version.create_idfa_declaration(attributes: attributes)
|
145
157
|
UI.verbose("Created IDFA delcaration")
|
146
158
|
end
|
159
|
+
|
160
|
+
updated_idfa = true
|
147
161
|
end
|
148
162
|
|
149
|
-
UI.success("Successfully updated IDFA delcarations on App Store Connect")
|
163
|
+
UI.success("Successfully updated IDFA delcarations on App Store Connect") if updated_idfa
|
150
164
|
end
|
151
165
|
|
152
166
|
def update_submission_information(options, app)
|
153
167
|
submission_information = options[:submission_information] || {}
|
168
|
+
submission_information = submission_information.collect { |k, v| [k.to_sym, v] }.to_h
|
154
169
|
|
155
170
|
content_rights = submission_information[:content_rights_contains_third_party_content]
|
156
171
|
|
@@ -171,6 +186,7 @@ module Deliver
|
|
171
186
|
|
172
187
|
def wait_for_build_processing_to_be_complete(app: nil, platform: nil, options: nil)
|
173
188
|
app_version = options[:app_version]
|
189
|
+
|
174
190
|
app_version ||= FastlaneCore::IpaFileAnalyser.fetch_app_version(options[:ipa]) if options[:ipa]
|
175
191
|
app_version ||= FastlaneCore::PkgFileAnalyser.fetch_app_version(options[:pkg]) if options[:pkg]
|
176
192
|
|
@@ -184,11 +200,14 @@ module Deliver
|
|
184
200
|
build_version: app_build,
|
185
201
|
poll_interval: 15,
|
186
202
|
return_when_build_appears: false,
|
187
|
-
return_spaceship_testflight_build: false
|
203
|
+
return_spaceship_testflight_build: false,
|
204
|
+
select_latest: true
|
188
205
|
)
|
189
206
|
|
190
|
-
|
191
|
-
|
207
|
+
if !app_version.nil? && !app_build.nil?
|
208
|
+
unless latest_build.app_version == app_version && latest_build.version == app_build
|
209
|
+
UI.important("Uploaded app #{app_version} - #{app_build}, but received build #{latest_build.app_version} - #{latest_build.version}.")
|
210
|
+
end
|
192
211
|
end
|
193
212
|
|
194
213
|
return latest_build
|
@@ -80,8 +80,10 @@ module Deliver
|
|
80
80
|
|
81
81
|
platform = Spaceship::ConnectAPI::Platform.map(options[:platform])
|
82
82
|
|
83
|
-
|
84
|
-
|
83
|
+
enabled_languages = detect_languages(options)
|
84
|
+
|
85
|
+
app_store_version_localizations = verify_available_version_languages!(options, app, enabled_languages) unless options[:edit_live]
|
86
|
+
app_info_localizations = verify_available_info_languages!(options, app, enabled_languages) unless options[:edit_live]
|
85
87
|
|
86
88
|
if options[:edit_live]
|
87
89
|
# not all values are editable when using live_version
|
@@ -106,7 +108,9 @@ module Deliver
|
|
106
108
|
end
|
107
109
|
|
108
110
|
# Needed for to filter out release notes from being sent up
|
109
|
-
|
111
|
+
number_of_versions = app.get_app_store_versions(filter: { platform: platform }, limit: 2).size
|
112
|
+
is_first_version = number_of_versions == 1
|
113
|
+
UI.verbose("Version '#{version.version_string}' is the first version on App Store Connect") if is_first_version
|
110
114
|
|
111
115
|
UI.important("Will begin uploading metadata for '#{version.version_string}' on App Store Connect")
|
112
116
|
|
@@ -158,7 +162,11 @@ module Deliver
|
|
158
162
|
end
|
159
163
|
|
160
164
|
release_type = if options[:auto_release_date]
|
161
|
-
|
165
|
+
# Convert time format to 2020-06-17T12:00:00-07:00
|
166
|
+
time_in_ms = options[:auto_release_date]
|
167
|
+
date = convert_ms_to_iso8601(time_in_ms)
|
168
|
+
|
169
|
+
non_localized_version_attributes['earliestReleaseDate'] = date
|
162
170
|
Spaceship::ConnectAPI::AppStoreVersion::ReleaseType::SCHEDULED
|
163
171
|
elsif options[:automatic_release]
|
164
172
|
Spaceship::ConnectAPI::AppStoreVersion::ReleaseType::AFTER_APPROVAL
|
@@ -315,6 +323,16 @@ module Deliver
|
|
315
323
|
|
316
324
|
# rubocop:enable Metrics/PerceivedComplexity
|
317
325
|
|
326
|
+
def convert_ms_to_iso8601(time_in_ms)
|
327
|
+
time_in_s = time_in_ms / 1000
|
328
|
+
|
329
|
+
# Remove minutes and seconds (whole hour)
|
330
|
+
seconds_in_hour = 60 * 60
|
331
|
+
time_in_s_to_hour = (time_in_s / seconds_in_hour).to_i * seconds_in_hour
|
332
|
+
|
333
|
+
return Time.at(time_in_s_to_hour).strftime("%Y-%m-%dT%H:%M:%S%:z")
|
334
|
+
end
|
335
|
+
|
318
336
|
# If the user is using the 'default' language, then assign values where they are needed
|
319
337
|
def assign_defaults(options)
|
320
338
|
# Normalizes languages keys from symbols to strings
|
@@ -389,7 +407,7 @@ module Deliver
|
|
389
407
|
end
|
390
408
|
|
391
409
|
# Finding languages to enable
|
392
|
-
def verify_available_info_languages!(options, app)
|
410
|
+
def verify_available_info_languages!(options, app, languages)
|
393
411
|
app_info = app.fetch_edit_app_info
|
394
412
|
|
395
413
|
unless app_info
|
@@ -399,7 +417,7 @@ module Deliver
|
|
399
417
|
|
400
418
|
localizations = app_info.get_app_info_localizations
|
401
419
|
|
402
|
-
languages = (
|
420
|
+
languages = (languages || []).reject { |lang| lang == "default" }
|
403
421
|
locales_to_enable = languages - localizations.map(&:locale)
|
404
422
|
|
405
423
|
if locales_to_enable.count > 0
|
@@ -423,7 +441,7 @@ module Deliver
|
|
423
441
|
end
|
424
442
|
|
425
443
|
# Finding languages to enable
|
426
|
-
def verify_available_version_languages!(options, app)
|
444
|
+
def verify_available_version_languages!(options, app, languages)
|
427
445
|
platform = Spaceship::ConnectAPI::Platform.map(options[:platform])
|
428
446
|
version = app.get_edit_app_store_version(platform: platform)
|
429
447
|
|
@@ -434,7 +452,7 @@ module Deliver
|
|
434
452
|
|
435
453
|
localizations = version.get_app_store_version_localizations
|
436
454
|
|
437
|
-
languages = (
|
455
|
+
languages = (languages || []).reject { |lang| lang == "default" }
|
438
456
|
locales_to_enable = languages - localizations.map(&:locale)
|
439
457
|
|
440
458
|
if locales_to_enable.count > 0
|
@@ -532,7 +550,8 @@ module Deliver
|
|
532
550
|
UI.message("Uploading app review information to App Store Connect")
|
533
551
|
app_store_review_detail = begin
|
534
552
|
version.fetch_app_store_review_detail
|
535
|
-
rescue
|
553
|
+
rescue => error
|
554
|
+
UI.error("Error fetching app store review detail - #{error.message}")
|
536
555
|
nil
|
537
556
|
end # errors if doesn't exist
|
538
557
|
if app_store_review_detail
|
@@ -544,7 +563,7 @@ module Deliver
|
|
544
563
|
|
545
564
|
def set_review_attachment_file(version, options)
|
546
565
|
app_store_review_detail = version.fetch_app_store_review_detail
|
547
|
-
app_review_attachments = app_store_review_detail.
|
566
|
+
app_review_attachments = app_store_review_detail.app_store_review_attachments || []
|
548
567
|
|
549
568
|
if options[:app_review_attachment_file]
|
550
569
|
app_review_attachments.each do |app_review_attachment|
|