fastlane 2.61.0.beta.20171006010004 → 2.61.0.beta.20171007010004

Sign up to get free protection for your applications and to get access to all the features.
Files changed (82) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +6 -161
  3. data/cert/README.md +7 -166
  4. data/deliver/README.md +7 -287
  5. data/deliver/lib/deliver/runner.rb +1 -1
  6. data/fastlane/README.md +7 -209
  7. data/fastlane/lib/fastlane/actions/cocoapods.rb +27 -8
  8. data/fastlane/lib/fastlane/actions/docs/assets/FrameitGit.gif +0 -0
  9. data/fastlane/lib/fastlane/actions/docs/assets/MacExample.png +0 -0
  10. data/fastlane/lib/fastlane/actions/docs/assets/PEMRecording.gif +0 -0
  11. data/fastlane/lib/fastlane/actions/docs/assets/PilotTextTransparent.png +0 -0
  12. data/fastlane/lib/fastlane/actions/docs/assets/PilotTextTransparentSmall.png +0 -0
  13. data/fastlane/lib/fastlane/actions/docs/assets/PilotTextWhite.png +0 -0
  14. data/fastlane/lib/fastlane/actions/docs/assets/PilotTransparent.png +0 -0
  15. data/fastlane/lib/fastlane/actions/docs/assets/QuickLookScreenshot.png +0 -0
  16. data/fastlane/lib/fastlane/actions/docs/assets/ScreenshotsBig.png +0 -0
  17. data/fastlane/lib/fastlane/actions/docs/assets/ScreenshotsOverview.png +0 -0
  18. data/fastlane/lib/fastlane/actions/docs/assets/SignErrors.png +0 -0
  19. data/fastlane/lib/fastlane/actions/docs/assets/UDIDPrint.png +0 -0
  20. data/fastlane/lib/fastlane/actions/docs/assets/frameit.png +0 -0
  21. data/fastlane/lib/fastlane/actions/docs/assets/github_repo.png +0 -0
  22. data/fastlane/lib/fastlane/actions/docs/assets/htmlPage.png +0 -0
  23. data/fastlane/lib/fastlane/actions/docs/assets/htmlPagePreview.jpg +0 -0
  24. data/fastlane/lib/fastlane/actions/docs/assets/htmlPagePreviewFade.jpg +0 -0
  25. data/fastlane/lib/fastlane/actions/docs/assets/match.png +0 -0
  26. data/fastlane/lib/fastlane/actions/docs/assets/match_appstore_small.gif +0 -0
  27. data/fastlane/lib/fastlane/actions/docs/assets/match_init.gif +0 -0
  28. data/fastlane/lib/fastlane/actions/docs/assets/match_nuke.gif +0 -0
  29. data/fastlane/lib/fastlane/actions/docs/assets/pem.png +0 -0
  30. data/fastlane/lib/fastlane/actions/docs/assets/pilot.ai +5377 -16
  31. data/fastlane/lib/fastlane/actions/docs/assets/precheck.gif +0 -0
  32. data/fastlane/lib/fastlane/actions/docs/assets/precheck.png +0 -0
  33. data/fastlane/lib/fastlane/actions/docs/assets/produce.png +0 -0
  34. data/fastlane/lib/fastlane/actions/docs/assets/running-screengrab.gif +0 -0
  35. data/fastlane/lib/fastlane/actions/docs/assets/scan.png +0 -0
  36. data/fastlane/lib/fastlane/actions/docs/assets/scanHTML.png +0 -0
  37. data/fastlane/lib/fastlane/actions/docs/assets/scanHTMLFailing.png +0 -0
  38. data/fastlane/lib/fastlane/actions/docs/assets/scanScreenshot.png +0 -0
  39. data/fastlane/lib/fastlane/actions/docs/assets/screengrab.png +0 -0
  40. data/fastlane/lib/fastlane/actions/docs/assets/sigh.png +0 -0
  41. data/fastlane/lib/fastlane/actions/docs/assets/sighRecording.gif +0 -0
  42. data/fastlane/lib/fastlane/actions/docs/assets/slack.png +0 -0
  43. data/fastlane/lib/fastlane/actions/docs/assets/snapshot.gif +0 -0
  44. data/fastlane/lib/fastlane/actions/docs/assets/snapshot.png +0 -0
  45. data/fastlane/lib/fastlane/actions/docs/assets/supply.png +0 -0
  46. data/fastlane/lib/fastlane/actions/docs/assets/testSummary.png +0 -0
  47. data/fastlane/lib/fastlane/actions/docs/cert.md +2 -4
  48. data/fastlane/lib/fastlane/actions/docs/deliver.md +1 -3
  49. data/fastlane/lib/fastlane/actions/docs/frameit.md +215 -0
  50. data/fastlane/lib/fastlane/actions/docs/gym.md +17 -17
  51. data/fastlane/lib/fastlane/actions/docs/match.md +352 -0
  52. data/fastlane/lib/fastlane/actions/docs/pem.md +120 -0
  53. data/fastlane/lib/fastlane/actions/docs/pilot.md +218 -0
  54. data/fastlane/lib/fastlane/actions/docs/precheck.md +97 -0
  55. data/fastlane/lib/fastlane/actions/docs/produce.md +227 -0
  56. data/fastlane/lib/fastlane/actions/docs/scan.md +145 -0
  57. data/fastlane/lib/fastlane/actions/docs/screengrab.md +145 -0
  58. data/fastlane/lib/fastlane/actions/docs/sigh.md +187 -0
  59. data/fastlane/lib/fastlane/actions/docs/snapshot.md +333 -0
  60. data/fastlane/lib/fastlane/actions/docs/supply.md +144 -0
  61. data/fastlane/lib/fastlane/plugins/plugin_manager.rb +5 -0
  62. data/fastlane/lib/fastlane/setup/setup_ios.rb +2 -0
  63. data/fastlane/lib/fastlane/version.rb +1 -1
  64. data/frameit/README.md +7 -290
  65. data/gym/README.md +7 -300
  66. data/match/README.md +7 -420
  67. data/match/lib/match/generator.rb +1 -0
  68. data/match/lib/match/git_helper.rb +31 -12
  69. data/match/lib/match/runner.rb +11 -6
  70. data/pem/README.md +7 -188
  71. data/pilot/README.md +7 -285
  72. data/pilot/lib/pilot/build_manager.rb +13 -10
  73. data/precheck/README.md +7 -171
  74. data/produce/README.md +7 -294
  75. data/scan/README.md +7 -219
  76. data/screengrab/README.md +7 -192
  77. data/sigh/README.md +7 -262
  78. data/snapshot/README.md +7 -408
  79. data/snapshot/lib/snapshot/reset_simulators.rb +4 -2
  80. data/spaceship/lib/spaceship/test_flight/build.rb +1 -1
  81. data/supply/README.md +7 -219
  82. metadata +52 -2
@@ -0,0 +1,333 @@
1
+ <p align="center">
2
+ <img src="/img/actions/snapshot.png" height="110">
3
+ </p>
4
+
5
+ ###### Automate taking localized screenshots of your iOS and tvOS apps on every device
6
+
7
+ <hr />
8
+ <h4 align="center">
9
+ Check out the new <a href="https://docs.fastlane.tools/getting-started/ios/screenshots">fastlane documentation</a> on how to generate screenshots
10
+ </h4>
11
+ <hr />
12
+
13
+ _snapshot_ generates localized iOS and tvOS screenshots for different device types and languages for the App Store and can be uploaded using ([_deliver_](https://github.com/fastlane/fastlane/tree/master/deliver)).
14
+
15
+ You have to manually create 20 (languages) x 6 (devices) x 5 (screenshots) = **600 screenshots**.
16
+
17
+ It's hard to get everything right!
18
+
19
+ - New screenshots with every (design) update
20
+ - No loading indicators
21
+ - Same content / screens
22
+ - [Clean Status Bar](#use-a-clean-status-bar)
23
+ - Uploading screenshots ([_deliver_](https://github.com/fastlane/fastlane/tree/master/deliver) is your friend)
24
+
25
+ More information about [creating perfect screenshots](https://krausefx.com/blog/creating-perfect-app-store-screenshots-of-your-ios-app).
26
+
27
+ _snapshot_ runs completely in the background - you can do something else, while your computer takes the screenshots for you.
28
+
29
+ -------
30
+
31
+ <p align="center">
32
+ <a href="#features">Features</a> &bull;
33
+ <a href="#ui-tests">UI Tests</a> &bull;
34
+ <a href="#quick-start">Quick Start</a> &bull;
35
+ <a href="#usage">Usage</a> &bull;
36
+ <a href="#tips">Tips</a> &bull;
37
+ <a href="#how-does-it-work">How?</a>
38
+ </p>
39
+
40
+ -------
41
+
42
+ # Features
43
+ - Create hundreds of screenshots in multiple languages on all simulators
44
+ - Take screenshots in multiple device simulators concurrently to cut down execution time (Xcode 9 only)
45
+ - Configure it once, store the configuration in git
46
+ - Do something else, while the computer takes the screenshots for you
47
+ - Integrates with [_fastlane_](https://fastlane.tools) and [_deliver_](https://github.com/fastlane/fastlane/tree/master/deliver)
48
+ - Generates a beautiful web page, which shows all screenshots on all devices. This is perfect to send to QA or the marketing team
49
+ - _snapshot_ automatically waits for network requests to be finished before taking a screenshot (we don't want loading images in the App Store screenshots)
50
+
51
+ After _snapshot_ successfully created new screenshots, it will generate a beautiful HTML file to get a quick overview of all screens:
52
+
53
+ ![img/actions/htmlPagePreviewFade.jpg](assets/htmlPagePreviewFade.jpg)
54
+
55
+ ## Why?
56
+
57
+ This tool automatically switches the language and device type and runs UI Tests for every combination.
58
+
59
+ ### Why should I automate this process?
60
+
61
+ - It takes **hours** to take screenshots
62
+ - You get a great overview of all your screens, running on all available simulators without the need to manually start it hundreds of times
63
+ - Easy verification for translators (without an iDevice) that translations do make sense in real App context
64
+ - Easy verification that localizations fit into labels on all screen dimensions
65
+ - It is an integration test: You can test for UI elements and other things inside your scripts
66
+ - Be so nice, and provide new screenshots with every App Store update. Your customers deserve it
67
+ - You realise, there is a spelling mistake in one of the screens? Well, just correct it and re-run the script
68
+
69
+ # UI Tests
70
+
71
+ ## Getting started
72
+ This project uses Apple's newly announced UI Tests. We will not go into detail on how to write scripts.
73
+
74
+ Here a few links to get started:
75
+
76
+ - [WWDC 2015 Introduction to UI Tests](https://developer.apple.com/videos/play/wwdc2015-406/)
77
+ - [A first look into UI Tests](http://www.mokacoding.com/blog/xcode-7-ui-testing/)
78
+ - [UI Testing in Xcode 7](http://masilotti.com/ui-testing-xcode-7/)
79
+ - [HSTestingBackchannel : ‘Cheat’ by communicating directly with your app](https://github.com/ConfusedVorlon/HSTestingBackchannel)
80
+ - [Automating App Store screenshots using fastlane snapshot and frameit](https://tisunov.github.io/2015/11/06/automating-app-store-screenshots-generation-with-fastlane-snapshot-and-sketch.html)
81
+
82
+ # Quick Start
83
+
84
+ - Create a new UI Test target in your Xcode project ([top part of this article](https://krausefx.com/blog/run-xcode-7-ui-tests-from-the-command-line))
85
+ - Run `fastlane snapshot init` in your project folder
86
+ - Add the ./SnapshotHelper.swift to your UI Test target (You can move the file anywhere you want)
87
+ - **Note:** if you're using Xcode 8, add the ./SnapshotHelperXcode8.swift to your UI Test target
88
+ - (Objective C only) add the bridging header to your test class.
89
+ - `#import "MYUITests-Swift.h"`
90
+ - The bridging header is named after your test target with -Swift.h appended.
91
+ - In your UI Test class, click the `Record` button on the bottom left and record your interaction
92
+ - To take a snapshot, call the following between interactions
93
+ - Swift: `snapshot("01LoginScreen")`
94
+ - Objective C: `[Snapshot snapshot:@"01LoginScreen" waitForLoadingIndicator:YES];`
95
+ - Add the following code to your `setUp()` method
96
+
97
+ **Swift**
98
+ ```swift
99
+ let app = XCUIApplication()
100
+ setupSnapshot(app)
101
+ app.launch()
102
+ ```
103
+
104
+ **Objective C**
105
+ ```objective-c
106
+ XCUIApplication *app = [[XCUIApplication alloc] init];
107
+ [Snapshot setupSnapshot:app];
108
+ [app launch];
109
+ ```
110
+
111
+ _Make sure you only have one `launch` call in your test class, as Xcode adds one automatically on new test files._
112
+
113
+ ![img/actions/snapshot.gif](assets/snapshot.gif)
114
+
115
+ You can try the _snapshot_ [example project](https://github.com/fastlane/fastlane/tree/master/snapshot/example) by cloning this repo.
116
+
117
+ To quick start your UI tests, you can use the UI Test recorder. You only have to interact with the simulator, and Xcode will generate the UI Test code for you. You can find the red record button on the bottom of the screen (more information in [this blog post](https://krausefx.com/blog/run-xcode-7-ui-tests-from-the-command-line))
118
+
119
+ # Usage
120
+
121
+ ```no-highlight
122
+ fastlane snapshot
123
+ ```
124
+
125
+ Your screenshots will be stored in the `./screenshots/` folder by default (or `./fastlane/screenshots` if you're using [fastlane](https://fastlane.tools))
126
+
127
+ New with Xcode 9, *snapshot* can run multiple simulators concurrently. This is the default behavior in order to take your screenshots as quickly as possible. This can be disabled to run each device, one at a time, by setting the `:concurrent_simulators` option to `false`.
128
+
129
+ **Note:** While running *snapshot* with Xcode 9, the simulators will not be visibly spawned. So, while you wont see the simulators running your tests, they will, in fact, be taking your screenshots.
130
+
131
+ If any error occurs while running the snapshot script on a device, that device will not have any screenshots, and _snapshot_ will continue with the next device or language. To stop the flow after the first error, run
132
+
133
+ ```no-highlight
134
+ fastlane snapshot --stop_after_first_error
135
+ ```
136
+
137
+ Also by default, _snapshot_ will open the HTML after all is done. This can be skipped with the following command
138
+
139
+
140
+ ```no-highlight
141
+ fastlane snapshot --stop_after_first_error --skip_open_summary
142
+ ```
143
+
144
+ There are a lot of options available that define how to build your app, for example
145
+
146
+ ```no-highlight
147
+ fastlane snapshot --scheme "UITests" --configuration "Release" --sdk "iphonesimulator"
148
+ ```
149
+
150
+ Reinstall the app before running _snapshot_
151
+
152
+ ```no-highlight
153
+ fastlane snapshot --reinstall_app --app_identifier "tools.fastlane.app"
154
+ ```
155
+
156
+ By default _snapshot_ automatically retries running UI Tests if they fail. This is due to randomly failing UI Tests (e.g. [#372](https://github.com/fastlane/snapshot/issues/372)). You can adapt this number using
157
+
158
+ ```no-highlight
159
+ fastlane snapshot --number_of_retries 3
160
+ ```
161
+
162
+ Add photos and/or videos to the simulator before running _snapshot_
163
+
164
+ ```no-highlight
165
+ fastlane snapshot --add_photos MyTestApp/Assets/demo.jpg --add_videos MyTestApp/Assets/demo.mp4
166
+ ```
167
+
168
+ For a list for all available options run
169
+
170
+ ```no-highlight
171
+ fastlane action snapshot
172
+ ```
173
+
174
+ After running _snapshot_ you will get a nice summary:
175
+
176
+ <img src="/img/actions/testSummary.png" width="500">
177
+
178
+ ## Snapfile
179
+
180
+ All of the available options can also be stored in a configuration file called the `Snapfile`. Since most values will not change often for your project, it is recommended to store them there:
181
+
182
+ First make sure to have a `Snapfile` (you get it for free when running `fastlane snapshot init`)
183
+
184
+ The `Snapfile` can contain all the options that are also available on `fastlane action snapshot`
185
+
186
+
187
+ ```ruby
188
+ scheme "UITests"
189
+
190
+ devices([
191
+ "iPhone 6",
192
+ "iPhone 6 Plus",
193
+ "iPhone 5",
194
+ "iPhone 4s"
195
+ ])
196
+
197
+ languages([
198
+ "en-US",
199
+ "de-DE",
200
+ "es-ES",
201
+ ["pt", "pt_BR"] # Portuguese with Brazilian locale
202
+ ])
203
+
204
+ launch_arguments(["-username Felix"])
205
+
206
+ # The directory in which the screenshots should be stored
207
+ output_directory './screenshots'
208
+
209
+ clear_previous_screenshots true
210
+
211
+ add_photos ["MyTestApp/Assets/demo.jpg"]
212
+
213
+ ```
214
+
215
+ ### Completely reset all simulators
216
+
217
+ You can run this command in the terminal to delete and re-create all iOS and tvOS simulators:
218
+
219
+ ```no-highlight
220
+ fastlane snapshot reset_simulators
221
+ ```
222
+
223
+ **Warning**: This will delete **all** your simulators and replace by new ones! This is useful, if you run into weird problems when running _snapshot_.
224
+
225
+ You can use the environment variable `SNAPSHOT_FORCE_DELETE` to stop asking for confirmation before deleting.
226
+
227
+ ## Update snapshot helpers
228
+
229
+ Some updates require the helper files to be updated. _snapshot_ will automatically warn you and tell you how to update.
230
+
231
+ Basically you can run
232
+
233
+ ```no-highlight
234
+ fastlane snapshot update
235
+ ```
236
+
237
+ to update your `SnapshotHelper.swift` files. In case you modified your `SnapshotHelper.swift` and want to manually update the file, check out [SnapshotHelper.swift](https://github.com/fastlane/fastlane/blob/master/snapshot/lib/assets/SnapshotHelper.swift).
238
+
239
+ ## Launch Arguments
240
+
241
+ You can provide additional arguments to your app on launch. These strings will be available in your app (eg. not in the testing target) through `ProcessInfo.processInfo.arguments`. Alternatively, use user-default syntax (`-key value`) and they will be available as key-value pairs in `UserDefaults.standard`.
242
+
243
+ ```ruby
244
+ launch_arguments([
245
+ "-firstName Felix -lastName Krause"
246
+ ])
247
+ ```
248
+
249
+ ```swift
250
+ name.text = UserDefaults.standard.string(forKey: "firstName")
251
+ // name.text = "Felix"
252
+ ```
253
+
254
+ _snapshot_ includes `-FASTLANE_SNAPSHOT YES`, which will set a temporary user default for the key `FASTLANE_SNAPSHOT`, you may use this to detect when the app is run by _snapshot_.
255
+
256
+ ```swift
257
+ if UserDefaults.standard.bool(forKey: "FASTLANE_SNAPSHOT") {
258
+ // runtime check that we are in snapshot mode
259
+ }
260
+ ```
261
+
262
+ Specify multiple argument strings and _snapshot_ will generate screenshots for each combination of arguments, devices, and languages. This is useful for comparing the same screenshots with different feature flags, dynamic text sizes, and different data sets.
263
+
264
+ ```ruby
265
+ # Snapfile for A/B Test Comparison
266
+ launch_arguments([
267
+ "-secretFeatureEnabled YES",
268
+ "-secretFeatureEnabled NO"
269
+ ])
270
+ ```
271
+
272
+ # How does it work?
273
+
274
+ The easiest solution would be to just render the UIWindow into a file. That's not possible because UI Tests don't run on a main thread. So _snapshot_ uses a different approach:
275
+
276
+ When you run unit tests in Xcode, the reporter generates a plist file, documenting all events that occurred during the tests ([More Information](http://michele.io/test-logs-in-xcode)). Additionally, Xcode generates screenshots before, during and after each of these events. There is no way to manually trigger a screenshot event. The screenshots and the plist files are stored in the DerivedData directory, which _snapshot_ stores in a temporary folder.
277
+
278
+ When the user calls `snapshot(...)` in the UI Tests (Swift or Objective C) the script actually does a rotation to `.Unknown` which doesn't have any effect on the actual app, but is enough to trigger a screenshot. It has no effect to the application and is not something you would do in your tests. The goal was to find *some* event that a user would never trigger, so that we know it's from _snapshot_. On tvOS, there is no orientation so we ask for a count of app views with type "Browser" (which should never exist on tvOS).
279
+
280
+ _snapshot_ then iterates through all test events and check where we either did this weird rotation (on iOS) or searched for browsers (on tvOS). Once _snapshot_ has all events triggered by _snapshot_ it collects a ordered list of all the file names of the actual screenshots of the application.
281
+
282
+ In the test output, the Swift _snapshot_ function will print out something like this
283
+
284
+ > snapshot: [some random text here]
285
+
286
+ _snapshot_ finds all these entries using a regex. The number of _snapshot_ outputs in the terminal and the number of _snapshot_ events in the plist file should be the same. Knowing that, _snapshot_ automatically matches these 2 lists to identify the name of each of these screenshots. They are then copied over to the output directory and separated by language and device.
287
+
288
+ 2 thing have to be passed on from _snapshot_ to the `xcodebuild` command line tool:
289
+
290
+ - The device type is passed via the `destination` parameter of the `xcodebuild` parameter
291
+ - The language is passed via a temporary file which is written by _snapshot_ before running the tests and read by the UI Tests when launching the application
292
+
293
+ If you find a better way to do any of this, please submit an issue on GitHub or even a pull request :+1:
294
+
295
+ Radar [23062925](https://openradar.appspot.com/radar?id=5056366381105152) has been resolved with Xcode 8.3, so it's now possible to actually take screenshots from the simulator. We'll keep using the old approach for now, since many of you still want to use older versions of Xcode.
296
+
297
+ # Tips
298
+
299
+ <hr />
300
+ <h4 align="center">
301
+ Check out the new <a href="https://docs.fastlane.tools/getting-started/ios/screenshots">fastlane documentation</a> on how to generate screenshots
302
+ </h4>
303
+ <hr />
304
+
305
+ ## Frame the screenshots
306
+
307
+ If you want to add frames around the screenshots and even put a title on top, check out [frameit](https://github.com/fastlane/fastlane/tree/master/frameit).
308
+
309
+ ## Available language codes
310
+ ```ruby
311
+ ALL_LANGUAGES = ["da", "de-DE", "el", "en-AU", "en-CA", "en-GB", "en-US", "es-ES", "es-MX", "fi", "fr-CA", "fr-FR", "id", "it", "ja", "ko", "ms", "nl-NL", "no", "pt-BR", "pt-PT", "ru", "sv", "th", "tr", "vi", "zh-Hans", "zh-Hant"]
312
+ ```
313
+
314
+ To get more information about language and locale codes please read [Internationalization and Localization Guide](https://developer.apple.com/library/ios/documentation/MacOSX/Conceptual/BPInternational/LanguageandLocaleIDs/LanguageandLocaleIDs.html).
315
+
316
+ ## Use a clean status bar
317
+
318
+ You can use [SimulatorStatusMagic](https://github.com/shinydevelopment/SimulatorStatusMagic) to clean up the status bar.
319
+
320
+ ## Editing the `Snapfile`
321
+
322
+ Change syntax highlighting to *Ruby*.
323
+
324
+ ### Simulator doesn't launch the application
325
+
326
+ When the app dies directly after the application is launched there might be 2 problems
327
+
328
+ - The simulator is somehow in a broken state and you need to re-create it. You can use `snapshot reset_simulators` to reset all simulators (this will remove all installed apps)
329
+ - A restart helps very often
330
+
331
+ ## Determine language
332
+
333
+ To detect the currently used localization in your tests, access the `deviceLanguage` variable from `SnapshotHelper.swift`.
@@ -0,0 +1,144 @@
1
+ <p align="center">
2
+ <img src="/img/actions/supply.png" height="110">
3
+ </p>
4
+
5
+ ###### Command line tool for updating Android apps and their metadata on the Google Play Store
6
+
7
+ _supply_ uploads app metadata, screenshots and binaries to Google Play. You can also select tracks for builds and promote builds to production.
8
+
9
+ -------
10
+
11
+ <p align="center">
12
+ <a href="#features">Features</a> &bull;
13
+ <a href="#setup">Setup</a> &bull;
14
+ <a href="#quick-start">Quick Start</a> &bull;
15
+ <a href="#available-commands">Commands</a> &bull;
16
+ <a href="#uploading-an-apk">Uploading an APK</a> &bull;
17
+ <a href="#images-and-screenshots">Images</a>
18
+ </p>
19
+
20
+ -------
21
+
22
+ ## Features
23
+ - Update existing Android applications on Google Play via the command line
24
+ - Upload new builds (APKs)
25
+ - Retrieve and edit metadata, such as title and description, for multiple languages
26
+ - Upload the app icon, promo graphics and screenshots for multiple languages
27
+ - Have a local copy of the metadata in your git repository
28
+ - Retrieve version code numbers from existing Google Play tracks
29
+
30
+
31
+ ## Setup
32
+
33
+ Setup consists of setting up your Google Developers Service Account
34
+
35
+ 1. Open the [Google Play Console](https://play.google.com/apps/publish/)
36
+ 1. Select **Settings** tab, followed by the **API access** tab
37
+ 1. Click the **Create Service Account** button and follow the **Google API Console** link in the dialog
38
+ 1. Click the **Create Service account** button at the top of the developers console screen
39
+ 1. Provide a name for the service account
40
+ 1. Click **Select a role** and choose **Project > Service Account Actor**
41
+ 1. Check the **Furnish a new private key** checkbox
42
+ 1. Select **JSON** as the Key type
43
+ 1. Click **Create** to close the dialog
44
+ 1. Make a note of the file name of the JSON file downloaded to your computer
45
+ 1. Back on the Google Play developer console, click **Done** to close the dialog
46
+ 1. Click on **Grant Access** for the newly added service account
47
+ 1. Choose **Release Manager** from the **Role** dropdown
48
+ 1. Click **Add user** to close the dialog
49
+
50
+ ### Migrating Google credential format (from .p12 key file to .json)
51
+
52
+ In previous versions of supply, credentials to your Play Console were stored as `.p12` files. Since version 0.4.0, supply now supports the recommended `.json` key Service Account credential files. If you wish to upgrade:
53
+
54
+ - follow the <a href="#setup">Setup</a> procedure once again to make sure you create the appropriate JSON file
55
+ - update your fastlane configuration or your command line invocation to use the appropriate argument if necessary.
56
+ Note that you don't need to take note nor pass the `issuer` argument anymore.
57
+
58
+
59
+ The previous p12 configuration is still currently supported.
60
+
61
+
62
+ ## Quick Start
63
+
64
+ - `cd [your_project_folder]`
65
+ - `fastlane supply init`
66
+ - Make changes to the downloaded metadata, add images, screenshots and/or an APK
67
+ - `fastlane supply run`
68
+
69
+ ## Available Commands
70
+
71
+ - `fastlane supply`: update an app with metadata, a build, images and screenshots
72
+ - `fastlane supply init`: download metadata for an existing app to a local directory
73
+ - `fastlane action supply`: show information on available commands, arguments and environment variables
74
+
75
+ You can either run _supply_ on its own and use it interactively, or you can pass arguments or specify environment variables for all the options to skip the questions.
76
+
77
+ ## Uploading an APK
78
+
79
+ To upload a new binary to Google Play, simply run
80
+
81
+ ```no-highlight
82
+ fastlane supply --apk path/to/app.apk
83
+ ```
84
+
85
+ This will also upload app metadata if you previously ran `fastlane supply init`.
86
+
87
+ To gradually roll out a new build use
88
+
89
+ ```no-highlight
90
+ fastlane supply --apk path/app.apk --track rollout --rollout 0.5
91
+ ```
92
+
93
+ Expansion files (obbs) found under the same directory as your APK will also be uploaded together with your APK as long as:
94
+
95
+ - they are identified as type 'main' or 'patch' (by containing 'main' or 'patch' in their file name)
96
+ - you have at most one of each type
97
+
98
+ ## Images and Screenshots
99
+
100
+ After running `fastlane supply init`, you will have a metadata directory. This directory contains one or more locale directories (e.g. en-US, en-GB, etc.), and inside this directory are text files such as `title.txt` and `short_description.txt`.
101
+
102
+ Inside of a given locale directory is a folder called `images`. Here you can supply images with the following file names (extension can be png, jpg or jpeg):
103
+
104
+ - `featureGraphic`
105
+ - `icon`
106
+ - `promoGraphic`
107
+ - `tvBanner`
108
+
109
+ And you can supply screenshots by creating directories with the following names, containing PNGs or JPEGs (image names are irrelevant):
110
+
111
+ - `phoneScreenshots/`
112
+ - `sevenInchScreenshots/` (7-inch tablets)
113
+ - `tenInchScreenshots/` (10-inch tablets)
114
+ - `tvScreenshots/`
115
+ - `wearScreenshots/`
116
+
117
+ Note that these will replace the current images and screenshots on the play store listing, not add to them.
118
+
119
+ ## Changelogs (What's new)
120
+
121
+ You can add changelog files under the `changelogs/` directory for each locale. The filename should exactly match the version code of the APK that it represents. `fastlane supply init` will populate changelog files from existing data on Google Play if no `metadata/` directory exists when it is run.
122
+
123
+ ```no-highlight
124
+ └── fastlane
125
+ └── metadata
126
+ └── android
127
+ ├── en-US
128
+ │ └── changelogs
129
+ │ ├── 100000.txt
130
+ │ └── 100100.txt
131
+ └── fr-FR
132
+ └── changelogs
133
+ └── 100100.txt
134
+ ```
135
+
136
+ ## Track Promotion
137
+
138
+ A common Play publishing scenario might involve uploading an APK version to a test track, testing it, and finally promoting that version to production.
139
+
140
+ This can be done using the `--track_promote_to` parameter. The `--track_promote_to` parameter works with the `--track` parameter to command the Play API to promote existing Play track APK version(s) (those active on the track identified by the `--track` param value) to a new track (`--track_promote_to` value).
141
+
142
+ ## Retrieve Track Version Codes
143
+
144
+ Before performing a new APK upload you may want to check existing track version codes, or you may simply want to provide an informational lane that displays the currently promoted version codes for the production track. You can use the `google_play_track_version_codes` action to retrieve existing version codes for a package and track. For more information, see `fastlane action google_play_track_version_codes` help output.