fastlane 2.196.0 → 2.199.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (63) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +94 -94
  3. data/cert/lib/cert/runner.rb +5 -2
  4. data/deliver/lib/assets/ScreenshotsHelp +29 -6
  5. data/deliver/lib/deliver/app_screenshot.rb +5 -4
  6. data/deliver/lib/deliver/app_screenshot_iterator.rb +1 -1
  7. data/deliver/lib/deliver/runner.rb +1 -1
  8. data/deliver/lib/deliver/upload_screenshots.rb +1 -1
  9. data/fastlane/lib/.DS_Store +0 -0
  10. data/fastlane/lib/fastlane/.DS_Store +0 -0
  11. data/fastlane/lib/fastlane/actions/.DS_Store +0 -0
  12. data/fastlane/lib/fastlane/actions/docs/upload_to_app_store.md.erb +1 -1
  13. data/fastlane/lib/fastlane/actions/download_dsyms.rb +61 -45
  14. data/fastlane/lib/fastlane/actions/ensure_xcode_version.rb +1 -1
  15. data/fastlane/lib/fastlane/actions/get_push_certificate.rb +1 -1
  16. data/fastlane/lib/fastlane/actions/get_version_number.rb +6 -2
  17. data/fastlane/lib/fastlane/actions/notarize.rb +29 -11
  18. data/fastlane/lib/fastlane/actions/set_github_release.rb +11 -5
  19. data/fastlane/lib/fastlane/actions/update_code_signing_settings.rb +18 -1
  20. data/fastlane/lib/fastlane/actions/xcversion.rb +18 -3
  21. data/fastlane/lib/fastlane/documentation/docs_generator.rb +17 -12
  22. data/fastlane/lib/fastlane/version.rb +1 -1
  23. data/fastlane/swift/Deliverfile.swift +1 -1
  24. data/fastlane/swift/DeliverfileProtocol.swift +1 -1
  25. data/fastlane/swift/Fastlane.swift +66 -21
  26. data/fastlane/swift/Gymfile.swift +1 -1
  27. data/fastlane/swift/GymfileProtocol.swift +5 -1
  28. data/fastlane/swift/Matchfile.swift +1 -1
  29. data/fastlane/swift/MatchfileProtocol.swift +1 -1
  30. data/fastlane/swift/Precheckfile.swift +1 -1
  31. data/fastlane/swift/PrecheckfileProtocol.swift +1 -1
  32. data/fastlane/swift/Runner.swift +3 -7
  33. data/fastlane/swift/Scanfile.swift +1 -1
  34. data/fastlane/swift/ScanfileProtocol.swift +3 -3
  35. data/fastlane/swift/Screengrabfile.swift +1 -1
  36. data/fastlane/swift/ScreengrabfileProtocol.swift +1 -1
  37. data/fastlane/swift/Snapshotfile.swift +1 -1
  38. data/fastlane/swift/SnapshotfileProtocol.swift +1 -1
  39. data/fastlane/swift/formatting/Brewfile.lock.json +26 -21
  40. data/fastlane_core/lib/fastlane_core/itunes_transporter.rb +38 -7
  41. data/frameit/lib/frameit/editor.rb +16 -18
  42. data/frameit/lib/frameit/trim_box.rb +6 -0
  43. data/gym/lib/gym/generators/build_command_generator.rb +1 -1
  44. data/gym/lib/gym/options.rb +6 -0
  45. data/match/lib/match/nuke.rb +79 -1
  46. data/match/lib/match/spaceship_ensure.rb +1 -0
  47. data/pem/lib/pem/manager.rb +29 -6
  48. data/pem/lib/pem/options.rb +9 -0
  49. data/pilot/lib/pilot/build_manager.rb +1 -1
  50. data/scan/lib/scan/options.rb +2 -2
  51. data/scan/lib/scan/runner.rb +1 -1
  52. data/snapshot/lib/snapshot/simulator_launchers/simulator_launcher_base.rb +1 -1
  53. data/spaceship/lib/spaceship/client.rb +35 -15
  54. data/spaceship/lib/spaceship/commands_generator.rb +1 -1
  55. data/spaceship/lib/spaceship/connect_api/models/build.rb +4 -2
  56. data/spaceship/lib/spaceship/connect_api/models/build_bundle.rb +59 -0
  57. data/spaceship/lib/spaceship/connect_api/models/certificate.rb +3 -0
  58. data/spaceship/lib/spaceship/connect_api/response.rb +13 -0
  59. data/spaceship/lib/spaceship/connect_api.rb +1 -0
  60. data/spaceship/lib/spaceship/globals.rb +9 -0
  61. data/spaceship/lib/spaceship/spaceauth_runner.rb +1 -1
  62. data/trainer/lib/.DS_Store +0 -0
  63. metadata +24 -18
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 470f259a547c6b79dcb0015c1688edcdedd67fce63d7a53d5fe47caee659b233
4
- data.tar.gz: 0dfac1fb999ccf2b25ebfd301dcd1347c9d6f67b469b8d785424fa8b26f9a0fb
3
+ metadata.gz: fcbdda77dc3e29ac8d1ce7440033a3f95f610e367bbffb6cd9156899993b8311
4
+ data.tar.gz: 7eb108144336aa3038db856ae2ac36894095db6e8bf57b1dceb39b2b2e079abd
5
5
  SHA512:
6
- metadata.gz: 8a7e5dec51ab3c6baebc067b7549429947bf471e112251a8eadbee68ac4f2ea79c096e4664321f54e614184d2303d2163e339d2b6d8856c807ed382bf8620d47
7
- data.tar.gz: 66090dc209412cce666bf4b29a0bf2f7103ed1dcec60097e01607f46e812d278c70c288a6ba615e891bc857f6ca0dda340e02d882849ab3e642aabd5a9013016
6
+ metadata.gz: 666df49eb19bb007a66bb4105ceb30330c609bd3d1105ed4a6ce295b48a7bdc01335199ec0a59d50fc75ff166d6f66155dbc336f4cfe71b65798a95f330b044c
7
+ data.tar.gz: a451304146470f1a8da8c2cdec8329a02b73bba9262641161eb0b884581d48b9cae404ad01e08bdf32d9ab58314bdaf4b645a61c4e50cc8aedf5d9113d2aa015
data/README.md CHANGED
@@ -35,55 +35,17 @@ If the above doesn't help, please [submit an issue](https://github.com/fastlane/
35
35
  <!-- This table is regenerated and resorted on each release -->
36
36
  <table id='team'>
37
37
  <tr>
38
- <td id='stefan-natchev'>
39
- <a href='https://github.com/snatchev'>
40
- <img src='https://github.com/snatchev.png' width='140px;'>
41
- </a>
42
- <h4 align='center'><a href='https://twitter.com/snatchev'>Stefan Natchev</a></h4>
43
- </td>
44
- <td id='jorge-revuelta-h'>
45
- <a href='https://github.com/minuscorp'>
46
- <img src='https://github.com/minuscorp.png' width='140px;'>
47
- </a>
48
- <h4 align='center'><a href='https://twitter.com/minuscorp'>Jorge Revuelta H</a></h4>
49
- </td>
50
- <td id='jérôme-lacoste'>
51
- <a href='https://github.com/lacostej'>
52
- <img src='https://github.com/lacostej.png' width='140px;'>
53
- </a>
54
- <h4 align='center'><a href='https://twitter.com/lacostej'>Jérôme Lacoste</a></h4>
55
- </td>
56
- <td id='olivier-halligon'>
57
- <a href='https://github.com/AliSoftware'>
58
- <img src='https://github.com/AliSoftware.png' width='140px;'>
59
- </a>
60
- <h4 align='center'><a href='https://twitter.com/aligatr'>Olivier Halligon</a></h4>
61
- </td>
62
- <td id='roger-oba'>
63
- <a href='https://github.com/rogerluan'>
64
- <img src='https://github.com/rogerluan.png' width='140px;'>
65
- </a>
66
- <h4 align='center'><a href='https://twitter.com/rogerluan_'>Roger Oba</a></h4>
67
- </td>
68
- </tr>
69
- <tr>
70
- <td id='maksym-grebenets'>
71
- <a href='https://github.com/mgrebenets'>
72
- <img src='https://github.com/mgrebenets.png' width='140px;'>
73
- </a>
74
- <h4 align='center'><a href='https://twitter.com/mgrebenets'>Maksym Grebenets</a></h4>
75
- </td>
76
38
  <td id='manish-rathi'>
77
39
  <a href='https://github.com/crazymanish'>
78
40
  <img src='https://github.com/crazymanish.png' width='140px;'>
79
41
  </a>
80
42
  <h4 align='center'><a href='https://twitter.com/iammanishrathi'>Manish Rathi</a></h4>
81
43
  </td>
82
- <td id='helmut-januschka'>
83
- <a href='https://github.com/hjanuschka'>
84
- <img src='https://github.com/hjanuschka.png' width='140px;'>
44
+ <td id='satoshi-namai'>
45
+ <a href='https://github.com/ainame'>
46
+ <img src='https://github.com/ainame.png' width='140px;'>
85
47
  </a>
86
- <h4 align='center'><a href='https://twitter.com/hjanuschka'>Helmut Januschka</a></h4>
48
+ <h4 align='center'><a href='https://twitter.com/ainame'>Satoshi Namai</a></h4>
87
49
  </td>
88
50
  <td id='matthew-ellis'>
89
51
  <a href='https://github.com/matthewellis'>
@@ -91,51 +53,63 @@ If the above doesn't help, please [submit an issue](https://github.com/fastlane/
91
53
  </a>
92
54
  <h4 align='center'><a href='https://twitter.com/mellis1995'>Matthew Ellis</a></h4>
93
55
  </td>
94
- <td id='kohki-miki'>
95
- <a href='https://github.com/giginet'>
96
- <img src='https://github.com/giginet.png' width='140px;'>
56
+ <td id='helmut-januschka'>
57
+ <a href='https://github.com/hjanuschka'>
58
+ <img src='https://github.com/hjanuschka.png' width='140px;'>
97
59
  </a>
98
- <h4 align='center'><a href='https://twitter.com/giginet'>Kohki Miki</a></h4>
60
+ <h4 align='center'><a href='https://twitter.com/hjanuschka'>Helmut Januschka</a></h4>
61
+ </td>
62
+ <td id='iulian-onofrei'>
63
+ <a href='https://github.com/revolter'>
64
+ <img src='https://github.com/revolter.png' width='140px;'>
65
+ </a>
66
+ <h4 align='center'><a href='https://twitter.com/Revolt666'>Iulian Onofrei</a></h4>
99
67
  </td>
100
68
  </tr>
101
69
  <tr>
102
- <td id='daniel-jankowski'>
103
- <a href='https://github.com/mollyIV'>
104
- <img src='https://github.com/mollyIV.png' width='140px;'>
70
+ <td id='stefan-natchev'>
71
+ <a href='https://github.com/snatchev'>
72
+ <img src='https://github.com/snatchev.png' width='140px;'>
105
73
  </a>
106
- <h4 align='center'><a href='https://twitter.com/mollyIV'>Daniel Jankowski</a></h4>
74
+ <h4 align='center'><a href='https://twitter.com/snatchev'>Stefan Natchev</a></h4>
107
75
  </td>
108
- <td id='danielle-tomlinson'>
109
- <a href='https://github.com/endocrimes'>
110
- <img src='https://github.com/endocrimes.png' width='140px;'>
76
+ <td id='andrew-mcburney'>
77
+ <a href='https://github.com/armcburney'>
78
+ <img src='https://github.com/armcburney.png' width='140px;'>
111
79
  </a>
112
- <h4 align='center'><a href='https://twitter.com/endocrimes'>Danielle Tomlinson</a></h4>
80
+ <h4 align='center'><a href='https://twitter.com/armcburney'>Andrew McBurney</a></h4>
113
81
  </td>
114
- <td id='fumiya-nakamura'>
115
- <a href='https://github.com/nafu'>
116
- <img src='https://github.com/nafu.png' width='140px;'>
82
+ <td id='daniel-jankowski'>
83
+ <a href='https://github.com/mollyIV'>
84
+ <img src='https://github.com/mollyIV.png' width='140px;'>
117
85
  </a>
118
- <h4 align='center'><a href='https://twitter.com/nafu003'>Fumiya Nakamura</a></h4>
86
+ <h4 align='center'><a href='https://twitter.com/mollyIV'>Daniel Jankowski</a></h4>
119
87
  </td>
120
- <td id='jan-piotrowski'>
121
- <a href='https://github.com/janpio'>
122
- <img src='https://github.com/janpio.png' width='140px;'>
88
+ <td id='max-ott'>
89
+ <a href='https://github.com/max-ott'>
90
+ <img src='https://github.com/max-ott.png' width='140px;'>
123
91
  </a>
124
- <h4 align='center'><a href='https://twitter.com/Sujan'>Jan Piotrowski</a></h4>
92
+ <h4 align='center'><a href='https://twitter.com/ott_max'>Max Ott</a></h4>
125
93
  </td>
126
- <td id='satoshi-namai'>
127
- <a href='https://github.com/ainame'>
128
- <img src='https://github.com/ainame.png' width='140px;'>
94
+ <td id='joshua-liebowitz'>
95
+ <a href='https://github.com/taquitos'>
96
+ <img src='https://github.com/taquitos.png' width='140px;'>
129
97
  </a>
130
- <h4 align='center'><a href='https://twitter.com/ainame'>Satoshi Namai</a></h4>
98
+ <h4 align='center'><a href='https://twitter.com/taquitos'>Joshua Liebowitz</a></h4>
131
99
  </td>
132
100
  </tr>
133
101
  <tr>
134
- <td id='luka-mirosevic'>
135
- <a href='https://github.com/lmirosevic'>
136
- <img src='https://github.com/lmirosevic.png' width='140px;'>
102
+ <td id='olivier-halligon'>
103
+ <a href='https://github.com/AliSoftware'>
104
+ <img src='https://github.com/AliSoftware.png' width='140px;'>
137
105
  </a>
138
- <h4 align='center'><a href='https://twitter.com/lmirosevic'>Luka Mirosevic</a></h4>
106
+ <h4 align='center'><a href='https://twitter.com/aligatr'>Olivier Halligon</a></h4>
107
+ </td>
108
+ <td id='aaron-brager'>
109
+ <a href='https://github.com/getaaron'>
110
+ <img src='https://github.com/getaaron.png' width='140px;'>
111
+ </a>
112
+ <h4 align='center'><a href='https://twitter.com/getaaron'>Aaron Brager</a></h4>
139
113
  </td>
140
114
  <td id='felix-krause'>
141
115
  <a href='https://github.com/KrauseFx'>
@@ -143,17 +117,25 @@ If the above doesn't help, please [submit an issue](https://github.com/fastlane/
143
117
  </a>
144
118
  <h4 align='center'><a href='https://twitter.com/KrauseFx'>Felix Krause</a></h4>
145
119
  </td>
120
+ <td id='danielle-tomlinson'>
121
+ <a href='https://github.com/endocrimes'>
122
+ <img src='https://github.com/endocrimes.png' width='140px;'>
123
+ </a>
124
+ <h4 align='center'><a href='https://twitter.com/endocrimes'>Danielle Tomlinson</a></h4>
125
+ </td>
146
126
  <td id='josh-holtz'>
147
127
  <a href='https://github.com/joshdholtz'>
148
128
  <img src='https://github.com/joshdholtz.png' width='140px;'>
149
129
  </a>
150
130
  <h4 align='center'><a href='https://twitter.com/joshdholtz'>Josh Holtz</a></h4>
151
131
  </td>
152
- <td id='aaron-brager'>
153
- <a href='https://github.com/getaaron'>
154
- <img src='https://github.com/getaaron.png' width='140px;'>
132
+ </tr>
133
+ <tr>
134
+ <td id='jorge-revuelta-h'>
135
+ <a href='https://github.com/minuscorp'>
136
+ <img src='https://github.com/minuscorp.png' width='140px;'>
155
137
  </a>
156
- <h4 align='center'><a href='https://twitter.com/getaaron'>Aaron Brager</a></h4>
138
+ <h4 align='center'><a href='https://twitter.com/minuscorp'>Jorge Revuelta H</a></h4>
157
139
  </td>
158
140
  <td id='jimmy-dee'>
159
141
  <a href='https://github.com/jdee'>
@@ -161,37 +143,55 @@ If the above doesn't help, please [submit an issue](https://github.com/fastlane/
161
143
  </a>
162
144
  <h4 align='center'>Jimmy Dee</h4>
163
145
  </td>
146
+ <td id='manu-wallner'>
147
+ <a href='https://github.com/milch'>
148
+ <img src='https://github.com/milch.png' width='140px;'>
149
+ </a>
150
+ <h4 align='center'><a href='https://twitter.com/acrooow'>Manu Wallner</a></h4>
151
+ </td>
152
+ <td id='kohki-miki'>
153
+ <a href='https://github.com/giginet'>
154
+ <img src='https://github.com/giginet.png' width='140px;'>
155
+ </a>
156
+ <h4 align='center'><a href='https://twitter.com/giginet'>Kohki Miki</a></h4>
157
+ </td>
158
+ <td id='jérôme-lacoste'>
159
+ <a href='https://github.com/lacostej'>
160
+ <img src='https://github.com/lacostej.png' width='140px;'>
161
+ </a>
162
+ <h4 align='center'><a href='https://twitter.com/lacostej'>Jérôme Lacoste</a></h4>
163
+ </td>
164
164
  </tr>
165
165
  <tr>
166
- <td id='max-ott'>
167
- <a href='https://github.com/max-ott'>
168
- <img src='https://github.com/max-ott.png' width='140px;'>
166
+ <td id='maksym-grebenets'>
167
+ <a href='https://github.com/mgrebenets'>
168
+ <img src='https://github.com/mgrebenets.png' width='140px;'>
169
169
  </a>
170
- <h4 align='center'><a href='https://twitter.com/ott_max'>Max Ott</a></h4>
170
+ <h4 align='center'><a href='https://twitter.com/mgrebenets'>Maksym Grebenets</a></h4>
171
171
  </td>
172
- <td id='andrew-mcburney'>
173
- <a href='https://github.com/armcburney'>
174
- <img src='https://github.com/armcburney.png' width='140px;'>
172
+ <td id='roger-oba'>
173
+ <a href='https://github.com/rogerluan'>
174
+ <img src='https://github.com/rogerluan.png' width='140px;'>
175
175
  </a>
176
- <h4 align='center'><a href='https://twitter.com/armcburney'>Andrew McBurney</a></h4>
176
+ <h4 align='center'><a href='https://twitter.com/rogerluan_'>Roger Oba</a></h4>
177
177
  </td>
178
- <td id='manu-wallner'>
179
- <a href='https://github.com/milch'>
180
- <img src='https://github.com/milch.png' width='140px;'>
178
+ <td id='jan-piotrowski'>
179
+ <a href='https://github.com/janpio'>
180
+ <img src='https://github.com/janpio.png' width='140px;'>
181
181
  </a>
182
- <h4 align='center'><a href='https://twitter.com/acrooow'>Manu Wallner</a></h4>
182
+ <h4 align='center'><a href='https://twitter.com/Sujan'>Jan Piotrowski</a></h4>
183
183
  </td>
184
- <td id='joshua-liebowitz'>
185
- <a href='https://github.com/taquitos'>
186
- <img src='https://github.com/taquitos.png' width='140px;'>
184
+ <td id='fumiya-nakamura'>
185
+ <a href='https://github.com/nafu'>
186
+ <img src='https://github.com/nafu.png' width='140px;'>
187
187
  </a>
188
- <h4 align='center'><a href='https://twitter.com/taquitos'>Joshua Liebowitz</a></h4>
188
+ <h4 align='center'><a href='https://twitter.com/nafu003'>Fumiya Nakamura</a></h4>
189
189
  </td>
190
- <td id='iulian-onofrei'>
191
- <a href='https://github.com/revolter'>
192
- <img src='https://github.com/revolter.png' width='140px;'>
190
+ <td id='luka-mirosevic'>
191
+ <a href='https://github.com/lmirosevic'>
192
+ <img src='https://github.com/lmirosevic.png' width='140px;'>
193
193
  </a>
194
- <h4 align='center'><a href='https://twitter.com/Revolt666'>Iulian Onofrei</a></h4>
194
+ <h4 align='center'><a href='https://twitter.com/lmirosevic'>Luka Mirosevic</a></h4>
195
195
  </td>
196
196
  </tr>
197
197
  </table>
@@ -154,8 +154,11 @@ module Cert
154
154
  when :developer_id_kext
155
155
  return Spaceship::ConnectAPI::Certificate::CertificateType::DEVELOPER_ID_KEXT
156
156
  when :developer_id_installer
157
- raise "Cannot do with ASC API?"
158
- # return Spaceship.certificate.developer_id_installer
157
+ if !Spaceship::ConnectAPI.token.nil?
158
+ raise "As of 2021-11-09, the App Store Connect API does not allow accessing DEVELOPER_ID_INSTALLER with the API Key. Please file an issue on GitHub if this has changed and needs to be updated"
159
+ else
160
+ return Spaceship::ConnectAPI::Certificate::CertificateType::DEVELOPER_ID_INSTALLER
161
+ end
159
162
  else
160
163
  UI.user_error("Unaccepted value for :type - #{Cert.config[:type]}")
161
164
  end
@@ -1,7 +1,30 @@
1
- Put all screenshots you want to use inside the folder of its language (e.g. en-US).
2
- The device type will automatically be recognized using the image resolution. Apple TV screenshots
3
- should be stored in a subdirectory named appleTV with language folders inside of it. iMessage
4
- screenshots, like Apple TV screenshots, should also be stored in a subdirectory named iMessage
5
- with language folders inside of it.
1
+ ## Screenshots Naming Rules
6
2
 
7
- The screenshots can be named whatever you want, but keep in mind they are sorted alphabetically.
3
+ Put all screenshots you want to use inside the folder of its language (e.g. `en-US`).
4
+ The device type will automatically be recognized using the image resolution.
5
+
6
+ The screenshots can be named whatever you want, but keep in mind they are sorted
7
+ alphabetically, in a human-friendly way. See https://github.com/fastlane/fastlane/pull/18200 for more details.
8
+
9
+ ### Exceptions
10
+
11
+ #### iPad Pro (3rd Gen) 12.9"
12
+
13
+ Since iPad Pro (3rd Gen) 12.9" and iPad Pro (2nd Gen) 12.9" have the same image
14
+ resolution, screenshots of the iPad Pro (3rd gen) 12.9" must contain either the
15
+ string `iPad Pro (12.9-inch) (3rd generation)`, `IPAD_PRO_3GEN_129`, or `ipadPro129`
16
+ (App Store Connect's internal naming of the display family for the 3rd generation iPad Pro)
17
+ in its filename to be assigned the correct display family and to be uploaded to
18
+ the correct screenshot slot in your app's metadata.
19
+
20
+ ### Other Platforms
21
+
22
+ #### Apple TV
23
+
24
+ Apple TV screenshots should be stored in a subdirectory named `appleTV` with language
25
+ folders inside of it.
26
+
27
+ #### iMessage
28
+
29
+ iMessage screenshots, like the Apple TV ones, should also be stored in a subdirectory
30
+ named `iMessage`, with language folders inside of it.
@@ -322,10 +322,11 @@ module Deliver
322
322
 
323
323
  def self.resolve_ipadpro_conflict_if_needed(screen_size, filename)
324
324
  is_3rd_gen = [
325
- "iPad Pro (12.9-inch) (3rd generation)", # default simulator name has this
326
- "iPad Pro (12.9-inch) (4th generation)", # default simulator name has this
327
- "ipadPro129", # downloaded screenshots name has this,
328
- "3GEN" # downloaded screenshots name from App Store Connect API has this
325
+ "iPad Pro (12.9-inch) (3rd generation)", # Default simulator has this name
326
+ "iPad Pro (12.9-inch) (4th generation)", # Default simulator has this name
327
+ "iPad Pro (12.9-inch) (5th generation)", # Default simulator has this name
328
+ "IPAD_PRO_3GEN_129", # Screenshots downloaded from App Store Connect has this name
329
+ "ipadPro129" # Legacy: screenshots downloaded from iTunes Connect used to have this name
329
330
  ].any? { |key| filename.include?(key) }
330
331
  if is_3rd_gen
331
332
  if screen_size == ScreenSize::IOS_IPAD_PRO
@@ -80,7 +80,7 @@ module Deliver
80
80
  screenshots_per_display_type = screenshots_for_language.reject { |screenshot| screenshot.device_type.nil? }.group_by(&:device_type)
81
81
 
82
82
  screenshots_per_display_type.each do |display_type, screenshots|
83
- # create AppScreenshotSet for given display_type if it doesn't exsit
83
+ # create AppScreenshotSet for given display_type if it doesn't exist
84
84
  app_screenshot_set = (app_screenshot_set_per_locale_and_display_type[language] || {})[display_type]
85
85
  app_screenshot_set ||= localization.create_app_screenshot_set(attributes: { screenshotDisplayType: display_type })
86
86
 
@@ -186,7 +186,7 @@ module Deliver
186
186
  end
187
187
 
188
188
  transporter = transporter_for_selected_team
189
- result = transporter.upload(package_path: package_path)
189
+ result = transporter.upload(package_path: package_path, asset_path: upload_ipa || upload_pkg)
190
190
 
191
191
  unless result
192
192
  transporter_errors = transporter.displayable_errors
@@ -157,7 +157,7 @@ module Deliver
157
157
 
158
158
  UI.verbose('Uploading jobs are completed')
159
159
 
160
- Helper.show_loading_indicator("Waiting for all the screenshots processed...")
160
+ Helper.show_loading_indicator("Waiting for all the screenshots to finish being processed...")
161
161
  states = wait_for_complete(iterator)
162
162
  Helper.hide_loading_indicator
163
163
  retry_upload_screenshots_if_needed(iterator, states, total_number_of_screenshots, tries, localizations, screenshots_per_language)
Binary file
Binary file
@@ -694,7 +694,7 @@ In this case, default values for keywords, urls, name and release notes are used
694
694
 
695
695
  [Starting March 20, 2019 Apple's App Store](https://developer.apple.com/news/?id=03202019a) requires 12.9-inch iPad Pro (3rd generation) screenshots additionally to the iPad Pro 2nd generation [screenshots](https://help.apple.com/app-store-connect/#/devd274dd925). As fastlane historically uses the screenshot dimensions to determine the "display family" of a screenshot, this poses a problem as both use the same dimensions and are recognized as the same device family.
696
696
 
697
- To solve this a screenshot of a 12.9-inch iPad Pro (3rd generation) must contain either the string `iPad Pro (12.9-inch) (3rd generation)` or `ipadPro129` (Apple's internal naming of the display family for the 3rd generation iPad Pro) in its filename to be assigned the correct display family and to be uploaded to the correct screenshot slot in your app's metadata.
697
+ To solve this a screenshot of a 12.9-inch iPad Pro (3rd generation) must contain either the string `iPad Pro (12.9-inch) (3rd generation)`, `IPAD_PRO_3GEN_129`, or `ipadPro129` (Apple's internal naming of the display family for the 3rd generation iPad Pro) in its filename to be assigned the correct display family and to be uploaded to the correct screenshot slot in your app's metadata.
698
698
 
699
699
  ## Automatically create screenshots
700
700
 
@@ -12,11 +12,18 @@ module Fastlane
12
12
  require 'net/http'
13
13
  require 'date'
14
14
 
15
- # Team selection passed though FASTLANE_ITC_TEAM_ID and FASTLANE_ITC_TEAM_NAME environment variables
16
- # Prompts select team if multiple teams and none specified
17
- UI.message("Login to App Store Connect (#{params[:username]})")
18
- Spaceship::ConnectAPI.login(params[:username], use_portal: false, use_tunes: true)
19
- UI.message("Login successful")
15
+ if (api_token = Spaceship::ConnectAPI::Token.from(hash: params[:api_key], filepath: params[:api_key_path]))
16
+ UI.message("Creating authorization token for App Store Connect API")
17
+ Spaceship::ConnectAPI.token = api_token
18
+ elsif !Spaceship::ConnectAPI.token.nil?
19
+ UI.message("Using existing authorization token for App Store Connect API")
20
+ else
21
+ # Team selection passed though FASTLANE_ITC_TEAM_ID and FASTLANE_ITC_TEAM_NAME environment variables
22
+ # Prompts select team if multiple teams and none specified
23
+ UI.message("Login to App Store Connect (#{params[:username]})")
24
+ Spaceship::ConnectAPI.login(params[:username], use_portal: false, use_tunes: true)
25
+ UI.message("Login successful")
26
+ end
20
27
 
21
28
  # Get App
22
29
  app = Spaceship::ConnectAPI::App.find(params[:app_identifier])
@@ -68,10 +75,11 @@ module Fastlane
68
75
 
69
76
  filter = { app: app.id }
70
77
  filter["preReleaseVersion.platform"] = platform
71
- build_resps = Spaceship::ConnectAPI.get_builds(filter: filter, sort: "-uploadedDate", includes: "preReleaseVersion").all_pages
72
- builds = build_resps.flat_map(&:to_models)
78
+ filter["preReleaseVersion.version"] = version if version
79
+ filter["version"] = build_number if build_number
80
+ build_resp = Spaceship::ConnectAPI.get_builds(filter: filter, sort: "-uploadedDate", includes: "preReleaseVersion,buildBundles")
73
81
 
74
- builds.each do |build|
82
+ build_resp.all_pages_each do |build|
75
83
  asc_app_version = build.app_version
76
84
  asc_build_number = build.version
77
85
  uploaded_date = DateTime.parse(build.uploaded_date)
@@ -107,46 +115,37 @@ module Fastlane
107
115
  end
108
116
 
109
117
  UI.verbose("Build_version: #{asc_build_number} matches #{build_number}, grabbing dsym_url") if build_number
110
- get_details_and_download_dsym(app: app, train: asc_app_version, build_number: asc_build_number, uploaded_date: uploaded_date, platform: itc_platform, wait_for_dsym_processing: wait_for_dsym_processing, wait_timeout: wait_timeout, output_directory: output_directory)
118
+ download_dsym(build: build, app: app, wait_for_dsym_processing: wait_for_dsym_processing, wait_timeout: wait_timeout, output_directory: output_directory)
111
119
  end
112
120
  end
113
121
 
114
- def self.get_details_and_download_dsym(app: nil, train: nil, build_number: nil, uploaded_date: nil, platform: nil, wait_for_dsym_processing: nil, wait_timeout: nil, output_directory: nil)
122
+ def self.download_dsym(build: nil, app: nil, wait_for_dsym_processing: nil, wait_timeout: nil, output_directory: nil)
115
123
  start = Time.now
116
- download_url = nil
124
+ dsym_urls = []
117
125
 
118
126
  loop do
119
- begin
120
- resp = Spaceship::Tunes.client.build_details(app_id: app.id, train: train, build_number: build_number, platform: platform)
121
-
122
- resp['apple_id'] = app.id
123
- build_details = Spaceship::Tunes::BuildDetails.factory(resp)
124
-
125
- download_url = build_details.dsym_url
126
- UI.verbose("dsym_url: #{download_url}")
127
- rescue Spaceship::TunesClient::ITunesConnectError => ex
128
- UI.error("Error accessing dSYM file for build\n\n#{build}\n\nException: #{ex}")
127
+ build_bundles = build.build_bundles.select { |b| b.includes_symbols == true }
128
+ dsym_urls = build_bundles.map(&:dsym_url).compact
129
+
130
+ break if build_bundles.count == dsym_urls.count
131
+
132
+ if !wait_for_dsym_processing || (Time.now - start) > wait_timeout
133
+ # In some cases, AppStoreConnect does not process the dSYMs, thus no error should be thrown.
134
+ UI.message("Could not find any dSYM for #{build.version} (#{build.app_version})")
135
+ break
136
+ else
137
+ UI.message("Waiting for dSYM file to appear...")
138
+ sleep(30) unless FastlaneCore::Helper.is_test?
139
+ build = Spaceship::ConnectAPI::Build.get(build_id: build.id)
129
140
  end
130
-
131
- unless download_url
132
- if !wait_for_dsym_processing || (Time.now - start) > wait_timeout
133
- # In some cases, AppStoreConnect does not process the dSYMs, thus no error should be thrown.
134
- UI.message("Could not find any dSYM for #{build_number} (#{train})")
135
- else
136
- UI.message("Waiting for dSYM file to appear...")
137
- sleep(30)
138
- next
139
- end
140
- end
141
-
142
- break
143
141
  end
144
142
 
145
- if download_url
146
- self.download(download_url, app.bundle_id, train, build_number, uploaded_date, output_directory)
147
- return if build_number
143
+ if dsym_urls.count == 0
144
+ UI.message("No dSYM URL for #{build.version} (#{build.app_version})")
148
145
  else
149
- UI.message("No dSYM URL for #{build_number} (#{train})")
146
+ dsym_urls.each do |url|
147
+ self.download(url, build, app, output_directory)
148
+ end
150
149
  end
151
150
  end
152
151
  # rubocop:enable Metrics/PerceivedComplexity
@@ -154,7 +153,7 @@ module Fastlane
154
153
  def self.get_latest_build!(app_id: nil, platform: nil)
155
154
  filter = { app: app_id }
156
155
  filter["preReleaseVersion.platform"] = platform
157
- latest_build = Spaceship::ConnectAPI.get_builds(filter: filter, sort: "-uploadedDate", includes: "preReleaseVersion").first
156
+ latest_build = Spaceship::ConnectAPI.get_builds(filter: filter, sort: "-uploadedDate", includes: "preReleaseVersion,buildBundles").first
158
157
 
159
158
  if latest_build.nil?
160
159
  UI.user_error!("Could not find any build for platform #{platform}") if platform
@@ -164,18 +163,18 @@ module Fastlane
164
163
  return latest_build
165
164
  end
166
165
 
167
- def self.download(download_url, bundle_id, train_number, build_version, uploaded_date, output_directory)
166
+ def self.download(download_url, build, app, output_directory)
168
167
  result = self.download_file(download_url)
169
- path = write_dsym(result, bundle_id, train_number, build_version, output_directory)
170
- UI.success("🔑 Successfully downloaded dSYM file for #{train_number} - #{build_version} to '#{path}'")
168
+ path = write_dsym(result, app.bundle_id, build.app_version, build.version, output_directory)
169
+ UI.success("🔑 Successfully downloaded dSYM file for #{build.app_version} - #{build.version} to '#{path}'")
171
170
 
172
171
  Actions.lane_context[SharedValues::DSYM_PATHS] ||= []
173
172
  Actions.lane_context[SharedValues::DSYM_PATHS] << File.expand_path(path)
174
173
 
175
- unless uploaded_date.nil?
176
- Actions.lane_context[SharedValues::DSYM_LATEST_UPLOADED_DATE] ||= uploaded_date
174
+ unless build.uploaded_date.nil?
175
+ Actions.lane_context[SharedValues::DSYM_LATEST_UPLOADED_DATE] ||= build.uploaded_date
177
176
  current_latest = Actions.lane_context[SharedValues::DSYM_LATEST_UPLOADED_DATE]
178
- Actions.lane_context[SharedValues::DSYM_LATEST_UPLOADED_DATE] = [current_latest, uploaded_date].max
177
+ Actions.lane_context[SharedValues::DSYM_LATEST_UPLOADED_DATE] = [current_latest, build.uploaded_date].max
179
178
  UI.verbose("Most recent build uploaded_date #{Actions.lane_context[SharedValues::DSYM_LATEST_UPLOADED_DATE]}")
180
179
  end
181
180
  end
@@ -234,6 +233,23 @@ module Fastlane
234
233
  user ||= CredentialsManager::AppfileConfig.try_fetch_value(:apple_id)
235
234
 
236
235
  [
236
+ FastlaneCore::ConfigItem.new(key: :api_key_path,
237
+ env_names: ["DOWNLOAD_DSYMS_API_KEY_PATH", "APP_STORE_CONNECT_API_KEY_PATH"],
238
+ description: "Path to your App Store Connect API Key JSON file (https://docs.fastlane.tools/app-store-connect-api/#using-fastlane-api-key-json-file)",
239
+ optional: true,
240
+ conflicting_options: [:api_key],
241
+ verify_block: proc do |value|
242
+ UI.user_error!("Couldn't find API key JSON file at path '#{value}'") unless File.exist?(value)
243
+ end),
244
+ FastlaneCore::ConfigItem.new(key: :api_key,
245
+ env_names: ["DOWNLOAD_DSYMS_API_KEY", "APP_STORE_CONNECT_API_KEY"],
246
+ description: "Your App Store Connect API Key information (https://docs.fastlane.tools/app-store-connect-api/#use-return-value-and-pass-in-as-an-option)",
247
+ type: Hash,
248
+ default_value: Fastlane::Actions.lane_context[Fastlane::Actions::SharedValues::APP_STORE_CONNECT_API_KEY],
249
+ default_value_dynamic: true,
250
+ optional: true,
251
+ sensitive: true,
252
+ conflicting_options: [:api_key_path]),
237
253
  FastlaneCore::ConfigItem.new(key: :username,
238
254
  short_option: "-u",
239
255
  env_name: "DOWNLOAD_DSYMS_USERNAME",
@@ -75,7 +75,7 @@ module Fastlane
75
75
  [
76
76
  "If building your app requires a specific version of Xcode, you can invoke this command before using gym.",
77
77
  "For example, to ensure that a beta version of Xcode is not accidentally selected to build, which would make uploading to TestFlight fail.",
78
- "You can either manually provide a specific version using `version: ` or you make use of the `.xcode-version` file.",
78
+ "You can either manually provide a specific version using `version:` or you make use of the `.xcode-version` file.",
79
79
  "Using the `strict` parameter, you can either verify the full set of version numbers strictly (i.e. `11.3.1`) or only a subset of them (i.e. `11.3` or `11`)."
80
80
  ].join("\n")
81
81
  end
@@ -60,7 +60,7 @@ module Fastlane
60
60
  end
61
61
 
62
62
  def self.is_supported?(platform)
63
- platform == :ios
63
+ [:ios, :mac].include?(platform)
64
64
  end
65
65
 
66
66
  def self.example_code
@@ -109,8 +109,10 @@ module Fastlane
109
109
  options = plist_files.keys
110
110
  selected = UI.select("What build configuration would you like to use?", options)
111
111
  plist_file = plist_files[selected]
112
- else
112
+ elsif plist_files_count > 0
113
113
  plist_file = plist_files.values.first
114
+ else
115
+ return nil
114
116
  end
115
117
 
116
118
  # $(SRCROOT) is the path of where the XcodeProject is
@@ -131,6 +133,8 @@ module Fastlane
131
133
  end
132
134
 
133
135
  def self.get_version_number_from_plist!(plist_file)
136
+ return '$(MARKETING_VERSION)' if plist_file.nil?
137
+
134
138
  plist = Xcodeproj::Plist.read_from_path(plist_file)
135
139
  UI.user_error!("Unable to read plist: #{plist_file}") unless plist
136
140
 
@@ -146,7 +150,7 @@ module Fastlane
146
150
  end
147
151
 
148
152
  def self.details
149
- "This action will return the current version number set on your project."
153
+ "This action will return the current version number set on your project. It first looks in the plist and then for '$(MARKETING_VERSION)' in the build settings."
150
154
  end
151
155
 
152
156
  def self.available_options