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
@@ -18,13 +18,11 @@
18
18
 
19
19
  In the gif we used `cert && sigh`, which will first create an iOS code signing certificate and then a provisioning profile for your app if _cert_ succeeded.
20
20
 
21
- ##### [Do you like fastlane? Be the first to know about updates and new fastlane tools](https://tinyletter.com/fastlane-tools)
22
-
23
21
  # Usage
24
22
 
25
23
  **Note**: It is recommended to use [match](/actions/match) according to the [codesigning.guide](https://codesigning.guide) for generating and maintaining your certificates. Use _cert_ directly only if you want full control over what's going on and know more about codesigning.
26
24
 
27
- ```
25
+ ```no-highlight
28
26
  fastlane cert
29
27
  ```
30
28
 
@@ -49,7 +47,7 @@ fastlane cert -u cert@krausefx.com
49
47
  For a list of available commands run
50
48
 
51
49
  ```no-highlight
52
- fastlane cert --help
50
+ fastlane action cert
53
51
  ```
54
52
 
55
53
  Keep in mind, there is no way for _cert_ to download existing certificates + private keys from the Apple Developer Portal, as the private key never leaves your computer.
@@ -28,8 +28,6 @@ _deliver_ uploads screenshots, metadata and binaries to iTunes Connect. Use _del
28
28
 
29
29
  To upload builds to TestFlight check out [pilot](/actions/pilot).
30
30
 
31
- ##### [Do you like fastlane? Be the first to know about updates and new fastlane tools](https://tinyletter.com/fastlane-tools)
32
-
33
31
  # Quick Start
34
32
 
35
33
  The guide will create all the necessary files for you, using the existing app metadata from iTunes Connect.
@@ -412,7 +410,7 @@ _deliver_ uses the following techniques under the hood:
412
410
  # Tips
413
411
 
414
412
  ## Available language codes
415
- ```
413
+ ```no-highlight
416
414
  no, en-US, en-CA, fi, ru, zh-Hans, nl-NL, zh-Hant, en-AU, id, de-DE, sv, ko, ms, pt-BR, el, es-ES, it, fr-CA, es-MX, pt-PT, vi, th, ja, fr-FR, da, tr, en-GB
417
415
  ```
418
416
 
@@ -0,0 +1,215 @@
1
+ <p align="center">
2
+ <img src="/img/actions/frameit.png" height="110">
3
+ </p>
4
+
5
+ ###### Quickly put your screenshots into the right device frames
6
+
7
+ _frameit_ allows you to put a gorgeous device frame around your iOS and macOS screenshots just by running one simple command. Use _frameit_ to prepare perfect screenshots for the App Store, your website, QA or emails.
8
+
9
+ -------
10
+
11
+ <p align="center">
12
+ <a href="#features">Features</a> &bull;
13
+ <a href="#usage">Usage</a> &bull;
14
+ <a href="#tips">Tips</a>
15
+ </p>
16
+
17
+ -------
18
+
19
+ <h5 align="center"><code>frameit</code> is part of <a href="https://fastlane.tools">fastlane</a>: The easiest way to automate beta deployments and releases for your iOS and Android apps.</h5>
20
+
21
+
22
+ # Features
23
+
24
+ Put a gorgeous device frame around your iOS and macOS screenshots just by running one simple command. Support for:
25
+ - iPhone, iPad and Mac
26
+ - Portrait and Landscape modes
27
+ - Several colors
28
+
29
+ The complete and updated list of supported devices and colors can be found [here](https://github.com/fastlane/frameit-frames/tree/gh-pages/latest)
30
+
31
+ Here is a nice gif, that shows ``_frameit_`` in action:
32
+
33
+ ![img/actions/FrameitGit.gif](assets/FrameitGit.gif?raw=1)
34
+
35
+ ### Results
36
+
37
+ ![img/actions/ScreenshotsBig.png](assets/ScreenshotsBig.png?raw=1)
38
+
39
+ -------
40
+
41
+ ![img/actions/ScreenshotsOverview.png](assets/ScreenshotsOverview.png?raw=1)
42
+
43
+ -------
44
+
45
+ ![img/actions/MacExample.png](assets/MacExample.png?raw=1)
46
+
47
+ <h5 align="center">The <code>frameit</code> 2.0 update was kindly sponsored by <a href="https://mindnode.com/">MindNode</a>, seen in the screenshots above.
48
+
49
+
50
+ The first time that ``_frameit_`` is executed the frames will be downloaded automatically. Originally the frames are coming from [Facebook frameset](http://facebook.design/devices) and they are kept on this repo: https://github.com/fastlane/frameit-frames
51
+
52
+ More information about this process and how to update the frames can be found [here](https://github.com/fastlane/fastlane/tree/master/frameit/frames_generator)
53
+
54
+ # Usage
55
+
56
+ Why should you have to use Photoshop, just to add a frame around your screenshots?
57
+
58
+ Just navigate to your folder of screenshots and use the following command:
59
+
60
+ fastlane frameit
61
+
62
+ To use the silver version of the frames:
63
+
64
+ fastlane frameit silver
65
+
66
+ To download the latest frames
67
+
68
+ fastlane frameit download_frames
69
+
70
+ When using _frameit_ without titles on top, the screenshots will have the full resolution, which means they can't be uploaded to the App Store directly. They are supposed to be used for websites, print media and emails. Check out the section below to use the screenshots for the App Store.
71
+
72
+ # Titles and Background (optional)
73
+
74
+ With _frameit_ 2.0 you are now able to add a custom background, title and text colors to your screenshots.
75
+
76
+ A working example can be found in the [fastlane examples](https://github.com/fastlane/examples/tree/master/MindNode/screenshots) project.
77
+
78
+ #### `Framefile.json`
79
+
80
+ Use it to define the general information:
81
+
82
+ ```json
83
+ {
84
+ "device_frame_version": "latest",
85
+ "default": {
86
+ "keyword": {
87
+ "font": "./fonts/MyFont-Rg.otf"
88
+ },
89
+ "title": {
90
+ "font": "./fonts/MyFont-Th.otf",
91
+ "color": "#545454"
92
+ },
93
+ "background": "./background.jpg",
94
+ "padding": 50,
95
+ "show_complete_frame": false,
96
+ "stack_title" : false,
97
+ "title_below_image": true
98
+ },
99
+
100
+ "data": [
101
+ {
102
+ "filter": "Brainstorming",
103
+ "keyword": {
104
+ "color": "#d21559"
105
+ }
106
+ },
107
+ {
108
+ "filter": "Organizing",
109
+ "keyword": {
110
+ "color": "#feb909"
111
+ }
112
+ },
113
+ {
114
+ "filter": "Sharing",
115
+ "keyword": {
116
+ "color": "#aa4dbc"
117
+ }
118
+ },
119
+ {
120
+ "filter": "Styling",
121
+ "keyword": {
122
+ "color": "#31bb48"
123
+ }
124
+ }
125
+ ]
126
+ }
127
+ ```
128
+ The `stack_title` value specifies whether _frameit_ should display the keyword above the title when both keyword and title are defined.
129
+
130
+ The `show_complete_frame` value specifies whether _frameit_ should shrink the device and frame so that they show in full in the framed screenshot. If it is false, then they can hang over the bottom of the screenshot.
131
+
132
+ The `title_below_image` value specifies whether _frameit_ should place the title below the screenshot. If it is false, it will be placed above the screenshot.
133
+
134
+ The `filter` value is a part of the screenshot named for which the given option should be used. If a screenshot is named `iPhone5_Brainstorming.png` the first entry in the `data` array will be used.
135
+
136
+ You can find a more complex [configuration](https://github.com/fastlane/examples/blob/master/MindNode/screenshots/Framefile.json) to also support Chinese, Japanese and Korean languages.
137
+
138
+ The `Framefile.json` should be in the `screenshots` folder, as seen in the [example](https://github.com/fastlane/examples/tree/master/MindNode/screenshots).
139
+
140
+ #### `.strings` files
141
+
142
+ To define the title and optionally the keyword, put two `.strings` files into the language folder (e.g. [en-US in the example project](https://github.com/fastlane/examples/tree/master/MindNode/screenshots/en-US))
143
+
144
+ The `keyword.strings` and `title.strings` are standard `.strings` file you already use for your iOS apps, making it easy to use your existing translation service to get localized titles.
145
+
146
+ **Note:** These `.strings` files **MUST** be utf-16 encoded (UTF-16 BE with BOM). They also must begin with an empty line. If you are having trouble see [issue #1740](https://github.com/fastlane/fastlane/issues/1740)
147
+
148
+ **Note:** You **MUST** provide a background if you want titles. _frameit_ will not add the tiles if a background is not specified.
149
+
150
+ #### Uploading screenshots to iTC
151
+
152
+ Use [deliver](https://github.com/fastlane/fastlane/tree/master/deliver) to upload all screenshots to iTunes Connect completely automatically 🚀
153
+
154
+ ### Mac
155
+
156
+ With _frameit_ 2.0 it's possible to also frame macOS Application screenshots. You have to provide the following:
157
+
158
+ - The `offset` information so _frameit_ knows where to put your screenshots
159
+ - A path to a `background`, which should contain both the background and the Mac
160
+ - `titleHeight`: The height in px that should be used for the title
161
+
162
+ ##### Example
163
+ ```json
164
+ {
165
+ "default": {
166
+ "title": {
167
+ "color": "#545454"
168
+ },
169
+ "background": "Mac.jpg",
170
+ "offset": {
171
+ "offset": "+676+479",
172
+ "titleHeight": 320
173
+ }
174
+ },
175
+ "data": [
176
+ {
177
+ "filter": "Brainstorming",
178
+ "keyword": {
179
+ "color": "#d21559"
180
+ }
181
+ }
182
+ ]
183
+ }
184
+ ```
185
+
186
+ Check out the [MindNode example project](https://github.com/fastlane/examples/tree/master/MindNode/screenshots).
187
+
188
+ # Tips
189
+
190
+ ## Generate localized screenshots
191
+ Check out [_snapshot_](https://github.com/fastlane/fastlane/tree/master/snapshot) to automatically generate screenshots using ```UI Automation```.
192
+
193
+ ## Alternative location to store device_frames
194
+
195
+ Device frames can also be stored in a ```./fastlane/screenshots/devices_frames``` directory if you prefer rather than in the ```~/.frameit/device_frames``` directory. If doing so please be aware that Apple's images are copyrighted and should not be redistributed as part of a repository so you may want to include them in your .gitignore file.
196
+
197
+ ## White background of frames
198
+
199
+ Some stock images provided by Apple still have a white background instead of a transparent one. You'll have to edit the Photoshop file to remove the white background, delete the generated `.png` file and run `fastlane frameit` again.
200
+
201
+ ## Use a clean status bar
202
+ You can use [SimulatorStatusMagic](https://github.com/shinydevelopment/SimulatorStatusMagic) to clean up the status bar.
203
+
204
+ ## Gray artifacts around text
205
+
206
+ If you run into any quality issues, like having a border around the font, it usually helps to just re-install `imagemagick`. You can do so by running
207
+
208
+ ```sh
209
+ brew uninstall imagemagick
210
+ brew install imagemagick
211
+ ```
212
+
213
+ ## Uninstall
214
+ - ```sudo gem uninstall fastlane```
215
+ - ```rm -rf ~/.frameit```
@@ -16,13 +16,13 @@
16
16
 
17
17
  # What's gym?
18
18
 
19
- _gym_ builds and packages iOS apps for you. It takes care of all the heavy lifting and makes it super easy to generate a signed `ipa` or `app` file :muscle:
19
+ _gym_ builds and packages iOS apps for you. It takes care of all the heavy lifting and makes it super easy to generate a signed `ipa` or `app` file 💪
20
20
 
21
21
  _gym_ is a replacement for [shenzhen](https://github.com/nomad/shenzhen).
22
22
 
23
23
  ### Before _gym_
24
24
 
25
- ```
25
+ ```no-highlight
26
26
  xcodebuild clean archive -archivePath build/MyApp \
27
27
  -scheme MyApp
28
28
  xcodebuild -exportArchive \
@@ -34,7 +34,7 @@ xcodebuild -exportArchive \
34
34
 
35
35
  ### With _gym_
36
36
 
37
- ```
37
+ ```no-highlight
38
38
  fastlane gym
39
39
  ```
40
40
 
@@ -44,17 +44,17 @@ _gym_ uses the latest APIs to build and sign your application which results in m
44
44
 
45
45
  | | Gym Features |
46
46
  |----------|----------------|
47
- :rocket: | _gym_ builds 30% faster than other build tools like [shenzhen](https://github.com/nomad/shenzhen)
48
- :checkered_flag: | Beautiful inline build output
49
- :book: | Helps you resolve common build errors like code signing issues
50
- :mountain_cableway: | Sensible defaults: Automatically detect the project, its schemes and more
51
- :link: | Works perfectly with [fastlane](https://fastlane.tools) and other tools
52
- :package: | Automatically generates an `ipa` and a compressed `dSYM` file
53
- :bullettrain_side: | Don't remember any complicated build commands, just _gym_
54
- :wrench: | Easy and dynamic configuration using parameters and environment variables
55
- :floppy_disk: | Store common build settings in a `Gymfile`
56
- :outbox_tray: | All archives are stored and accessible in the Xcode Organizer
57
- :computer: | Supports both iOS and Mac applications
47
+ 🚀 | _gym_ builds 30% faster than other build tools like [shenzhen](https://github.com/nomad/shenzhen)
48
+ 🏁 | Beautiful inline build output
49
+ 📖 | Helps you resolve common build errors like code signing issues
50
+ 🚠 | Sensible defaults: Automatically detect the project, its schemes and more
51
+ 🔗 | Works perfectly with [fastlane](https://fastlane.tools) and other tools
52
+ 📦 | Automatically generates an `ipa` and a compressed `dSYM` file
53
+ 🚅 | Don't remember any complicated build commands, just _gym_
54
+ 🔧 | Easy and dynamic configuration using parameters and environment variables
55
+ 💾 | Store common build settings in a `Gymfile`
56
+ 📤 | All archives are stored and accessible in the Xcode Organizer
57
+ 💻 | Supports both iOS and Mac applications
58
58
 
59
59
  ![/img/actions/gymScreenshot.png](/img/actions/gymScreenshot.png)
60
60
 
@@ -82,7 +82,7 @@ DEVELOPER_DIR="/Applications/Xcode6.2.app" fastlane gym
82
82
 
83
83
  For a list of all available parameters use
84
84
 
85
- ```
85
+ ```no-highlight
86
86
  fastlane action gym
87
87
  ```
88
88
 
@@ -207,7 +207,7 @@ When you run _gym_ without the `--silent` mode it will print out every command i
207
207
 
208
208
  To build the archive _gym_ uses the following command:
209
209
 
210
- ```
210
+ ```no-highlight
211
211
  set -o pipefail && \
212
212
  xcodebuild -scheme 'Example' \
213
213
  -project './Example.xcodeproj' \
@@ -223,7 +223,7 @@ _gym_ automatically chooses a different packaging method depending on the versio
223
223
 
224
224
  ### Xcode 7 and above
225
225
 
226
- ```
226
+ ```no-highlight
227
227
  /usr/bin/xcrun path/to/xcbuild-safe.sh -exportArchive \
228
228
  -exportOptionsPlist '/tmp/gym_config_1442852529.plist' \
229
229
  -archivePath '/Users/fkrause/Library/Developer/Xcode/Archives/2015-09-21/App 2015-09-21 09.21.56.xcarchive' \
@@ -0,0 +1,352 @@
1
+ <p align="center">
2
+ <img src="/img/actions/match.png" height="110">
3
+ </p>
4
+
5
+ ###### Easily sync your certificates and profiles across your team using git
6
+
7
+ A new approach to iOS code signing: Share one code signing identity across your development team to simplify your codesigning setup and prevent code signing issues.
8
+
9
+ _match_ is the implementation of the https://codesigning.guide concept. _match_ creates all required certificates & provisioning profiles and stores them in a separate git repository. Every team member with access to the repo can use those credentials for code signing. _match_ also automatically repairs broken and expired credentials. It's the easiest way to share signing credentials across teams
10
+
11
+ [More information on how to get started with codesigning](https://docs.fastlane.tools/codesigning/getting-started/)
12
+
13
+ -------
14
+
15
+ <p align="center">
16
+ <a href="#why-match">Why?</a> &bull;
17
+ <a href="#usage">Usage</a> &bull;
18
+ <a href="#is-this-secure">Is this secure?</a>
19
+ </p>
20
+
21
+ -------
22
+
23
+ <h5 align="center"><code>match</code> is part of <a href="https://fastlane.tools">fastlane</a>: The easiest way to automate beta deployments and releases for your iOS and Android apps.</h5>
24
+
25
+ ## Why match?
26
+
27
+ Before starting to use _match_, make sure to read the [codesigning.guide](https://codesigning.guide)
28
+
29
+ > When deploying an app to the App Store, beta testing service or even installing it on a device, most development teams have separate code signing identities for every member. This results in dozens of profiles including a lot of duplicates.
30
+
31
+ > You have to manually renew and download the latest set of provisioning profiles every time you add a new device or a certificate expires. Additionally this requires spending a lot of time when setting up a new machine that will build your app.
32
+
33
+ **A new approach**
34
+
35
+ > Share one code signing identity across your development team to simplify your setup and prevent code signing issues. What if there was a central place where your code signing identity and profiles are kept, so anyone in the team can access them during the build process?
36
+
37
+ ### Why not let Xcode handle all this?
38
+
39
+ - You have full control over what happens
40
+ - You have access to all the certificates and profiles, which are all securely stored in git
41
+ - You share one code signing identity across the team to have fewer certificates and profiles
42
+ - Xcode sometimes revokes certificates which breaks your setup causing failed builds
43
+ - More predictable builds by settings profiles in an explicit way instead of using the `Automatic` setting
44
+ - It just works™
45
+
46
+ ### What does _match_ do for you?
47
+
48
+ | | match |
49
+ |----------|---------|
50
+ 🔄 | Automatically sync your iOS keys and profiles across all your team members using git
51
+ 📦 | Handle all the heavy lifting of creating and storing your certificates and profiles
52
+ 💻 | Setup codesigning on a new machine in under a minute
53
+ 🎯 | Designed to work with apps with multiple targets and bundle identifiers
54
+ 🔒 | You have full control over your files and Git repo, no third party service involved
55
+ ✨ | Provisioning profile will always match the correct certificate
56
+ 💥 | Easily reset your existing profiles and certificates if your current account has expired or invalid profiles
57
+ ♻️ | Automatically renew your provisioning profiles to include all your devices using the `--force` option
58
+ 👥 | Support for multiple Apple accounts and multiple teams
59
+ ✨ | Tightly integrated with [fastlane](https://fastlane.tools) to work seamlessly with [gym](https://github.com/fastlane/fastlane/tree/master/gym) and other build tools
60
+
61
+ For more information about the concept, visit [codesigning.guide](https://codesigning.guide).
62
+
63
+ ## Usage
64
+
65
+ ### Setup
66
+
67
+ 1. Create a **new, private Git repo** (e.g. on [GitHub](https://github.com/new) or [BitBucket](https://bitbucket.org/repo/create)) and name it something like `certificates`. **Important:** Make sure the repository is set to *private*.
68
+
69
+ 2. Optional: Create a **new, shared Apple Developer Portal account**, something like `office@company.com` that will be shared across your team from now on (for more information visit [codesigning.guide](https://codesigning.guide))
70
+
71
+ 3. Run the following in your project folder to start using _match_:
72
+
73
+ ```no-highlight
74
+ fastlane match init
75
+ ```
76
+
77
+ <img src="/img/actions/match_init.gif" width="550" />
78
+
79
+ You'll be asked to enter the URL to your Git repo. This can be either a `https://` or a `git` URL. (If your machine is currently using SSH to authenticate with Github, you'll want to use a `git` URL, otherwise you may see an authentication error when you attempt to use match.) `fastlane match init` won't read or modify your certificates or profiles.
80
+
81
+ This will create a `Matchfile` in your current directory (or in your `./fastlane/` folder).
82
+
83
+ Example content (for more advanced setups check out the [fastlane section](#fastlane)):
84
+
85
+ ```ruby
86
+ git_url "https://github.com/fastlane/fastlane/tree/master/certificates"
87
+
88
+ app_identifier "tools.fastlane.app"
89
+ username "user@fastlane.tools"
90
+ ```
91
+
92
+ #### Important: Use one git branch per team
93
+
94
+ _match_ also supports storing certificates of multiple teams in one repo, by using separate git branches. If you work in multiple teams, make sure to set the `git_branch` parameter to a unique value per team. From there, _match_ will automatically create and use the specified branch for you.
95
+
96
+ ```ruby
97
+ match(git_branch: "team1", username: "user@team1.com")
98
+ match(git_branch: "team2", username: "user@team2.com")
99
+ ```
100
+
101
+ ### Run
102
+
103
+ > Before running _match_ for the first time, you should consider clearing your existing profiles and certificates using the [match nuke command](#nuke).
104
+
105
+ After running `fastlane match init` you can run the following to generate new certificates and profiles:
106
+
107
+ ```no-highlight
108
+ fastlane match appstore
109
+ ```
110
+
111
+ ```no-highlight
112
+ fastlane match development
113
+ ```
114
+
115
+ <img src="/img/actions/match_appstore_small.gif" width="550" />
116
+
117
+ This will create a new certificate and provisioning profile (if required) and store them in your Git repo. If you previously ran _match_ it will automatically install the existing profiles from the Git repo.
118
+
119
+ The provisioning profiles are installed in `~/Library/MobileDevice/Provisioning Profiles` while the certificates and private keys are installed in your Keychain.
120
+
121
+ To get a more detailed output of what _match_ is doing use
122
+
123
+ ```no-highlight
124
+ fastlane match --verbose
125
+ ```
126
+
127
+ For a list of all available options run
128
+
129
+ ```no-highlight
130
+ fastlane action match
131
+ ```
132
+
133
+ #### Handle multiple targets
134
+
135
+ If you have several targets with different bundle identifiers, supply them as a comma-separated list to :
136
+
137
+ ```no-highlight
138
+ fastlane match appstore -a tools.fastlane.app,tools.fastlane.app.watchkitapp
139
+ ```
140
+
141
+ You can make this even easier using [fastlane](https://github.com/fastlane/fastlane/tree/master/fastlane) by creating a `certificates` lane like this:
142
+
143
+ ```ruby
144
+ lane :certificates do
145
+ match(app_identifier: ["com.krausefx.app1", "com.krausefx.app2", "com.krausefx.app3"], readonly: true)
146
+ end
147
+ ```
148
+
149
+ Then all your team has to do is `fastlane certificates` and keys, certs and profiles for all targets will be synced.
150
+
151
+ #### Passphrase
152
+
153
+ When running _match_ for the first time on a new machine, it will ask you for the passphrase for the Git repository. This is an additional layer of security: each of the files will be encrypted using `openssl`. Make sure to remember the password, as you'll need it when you run match on a different machine.
154
+
155
+ To set the passphrase to decrypt your profiles using an environment variable, use `MATCH_PASSWORD`.
156
+
157
+ #### New machine
158
+
159
+ To set up the certificates and provisioning profiles on a new machine, you just run the same command using:
160
+
161
+ ```no-highlight
162
+ fastlane match development
163
+ ```
164
+
165
+ You can also run _match_ in a `readonly` mode to be sure it won't create any new certificates or profiles.
166
+
167
+ ```no-highlightno-highlight
168
+ fastlane match development --readonly
169
+ ```
170
+
171
+ #### Access Control
172
+
173
+ A benefit of using _match_ is that it enables you to give the developers of your team access to the code signing certificates without having to give everyone access to the Developer Portal:
174
+
175
+ 1. Run _match_ to store the certificates in a Git repo
176
+ 2. Grant access to the Git repo to your developers and give them the passphrase
177
+ 3. The developers can now run _match_ which will install the latest code signing profiles so they can build and sign the application without having to have access to the developer portal
178
+ 4. Every time you run _match_ to update the profiles (e.g. add a new device), all your developers will automatically get the latest profiles when running _match_
179
+
180
+ If you decide to run _match_ without access to the developer portal, make sure to use the `--readonly` option so that the commands don't ask you for the password to the developer portal.
181
+
182
+ The advantage of this approach is that no one in your team will revoke a certificate by mistake. Additionally it is recommended to install the [FixCode Xcode Plugin](https://github.com/neonichu/FixCode) to disable the `Fix Issue` button.
183
+
184
+ #### Git Repo
185
+
186
+ After running _match_ for the first time, your Git repo will contain 2 directories:
187
+
188
+ - The `certs` folder contains all certificates with their private keys
189
+ - The `profiles` folder contains all provisioning profiles
190
+
191
+ Additionally, _match_ creates a nice repo `README.md` for you, making it easy to onboard new team members:
192
+
193
+ <p align="center">
194
+ <img src="/img/actions/github_repo.png" width="700" />
195
+ </p>
196
+
197
+ #### fastlane
198
+
199
+ Add _match_ to your `Fastfile` to automatically fetch the latest code signing certificates with [fastlane](https://fastlane.tools).
200
+
201
+ ```ruby
202
+ match(type: "appstore")
203
+
204
+ match(git_url: "https://github.com/fastlane/fastlane/tree/master/certificates",
205
+ type: "development")
206
+
207
+ match(git_url: "https://github.com/fastlane/fastlane/tree/master/certificates",
208
+ type: "adhoc",
209
+ app_identifier: "tools.fastlane.app")
210
+
211
+ match(git_url: "https://github.com/fastlane/fastlane/tree/master/certificates",
212
+ type: "enterprise",
213
+ app_identifier: "tools.fastlane.app")
214
+
215
+ # _match_ should be called before building the app with _gym_
216
+ gym
217
+ ...
218
+ ```
219
+
220
+ ##### Registering new devices
221
+
222
+ By using _match_, you'll save a lot of time every time you add new device to your Ad Hoc or Development profiles. Use _match_ in combination with the [`register_devices`](https://docs.fastlane.tools/actions#register_devices) action.
223
+
224
+ ```ruby
225
+ lane :beta do
226
+ register_devices(devices_file: "./devices.txt")
227
+ match(type: "adhoc", force_for_new_devices: true)
228
+ end
229
+ ```
230
+
231
+ By using the `force_for_new_devices` parameter, _match_ will check if the device count has changed since the last time you ran _match_, and automatically re-generate the provisioning profile if necessary. You can also use `force: true` to re-generate the provisioning profile on each run.
232
+
233
+ _**Important:** The `force_for_new_devices` parameter is ignored for App Store provisioning profiles since they don't contain any device information._
234
+
235
+ If you're not using `fastlane`, you can also use the `force_for_new_devices` option from the command line:
236
+
237
+ ```no-highlight
238
+ fastlane match adhoc --force_for_new_devices
239
+ ```
240
+
241
+ ##### Multiple Targets
242
+
243
+ If your app has multiple targets (e.g. Today Widget or WatchOS Extension)
244
+
245
+ ```ruby
246
+ match(app_identifier: ["tools.fastlane.app", "tools.fastlane.app.today_widget"], type: "appstore")
247
+ ```
248
+
249
+ _match_ can even use the same one Git repository for all bundle identifiers.
250
+
251
+ ### Setup Xcode project
252
+
253
+ [Docs on how to set up your Xcode project](https://docs.fastlane.tools/codesigning/XcodeProject/)
254
+
255
+ #### To build from the command line using [fastlane](https://fastlane.tools)
256
+
257
+ _match_ automatically pre-fills environment variables with the UUIDs of the correct provisioning profiles, ready to be used in your Xcode project.
258
+
259
+ More information about how to setup your Xcode project can be found [here](https://docs.fastlane.tools/codesigning/XcodeProject/)
260
+
261
+ #### To build from Xcode manually
262
+
263
+ This is useful when installing your application on your device using the Development profile.
264
+
265
+ You can statically select the right provisioning profile in your Xcode project (the name will be `match Development tools.fastlane.app`).
266
+
267
+ [Docs on how to set up your Xcode project](/codesigning/xcode-project/.md)
268
+
269
+ ### Continuous Integration
270
+
271
+ #### Repo access
272
+ There is one tricky part of setting up a CI system to work with _match_, which is enabling the CI to access the repo. Usually you'd just add your CI's public ssh key as a deploy key to your _match_ repo, but since your CI will already likely be using its public ssh key to access the codebase repo, [you won't be able to do that](https://help.github.com/articles/error-key-already-in-use/).
273
+
274
+ Some repo hosts might allow you to use the same deploy key for different repos, but GitHub will not. If your host does, you don't need to worry about this, just add your CI's public ssh key as a deploy key for your _match_ repo and scroll down to "_Encryption password_".
275
+
276
+ There are a few ways around this:
277
+
278
+ 1. Create a new account on your repo host with read-only access to your _match_ repo. Bitrise have a good description of this [here](http://devcenter.bitrise.io/faq/adding-projects-with-submodules/).
279
+ 2. Some CIs allow you to upload your signing credentials manually, but obviously this means that you'll have to re-upload the profiles/keys/certs each time they change.
280
+
281
+ Neither solution is pretty. It's one of those _trade-off_ things. Do you care more about **not** having an extra account sitting around, or do you care more about having the :sparkles: of auto-syncing of credentials.
282
+
283
+ #### Encryption password
284
+ Once you've decided which approach to take, all that's left to do is to set your encryption password as secret environment variable named `MATCH_PASSWORD`. _match_ will pick this up when it's run.
285
+
286
+ ### Nuke
287
+
288
+ If you never really cared about code signing and have a messy Apple Developer account with a lot of invalid, expired or Xcode managed profiles/certificates, you can use the `match nuke` command to revoke your certificates and provisioning profiles. Don't worry, apps that are already available in the App Store / TestFlight will still work. Builds distributed via Ad Hoc or Enterprise will be disabled after nuking your account, so you'll have to re-upload a new build. After clearing your account you'll start from a clean state, and you can run _match_ to generate your certificates and profiles again.
289
+
290
+ To revoke all certificates and provisioning profiles for a specific environment:
291
+
292
+ ```no-highlight
293
+ fastlane match nuke development
294
+ fastlane match nuke distribution
295
+ ```
296
+
297
+ <img src="/img/actions/match_nuke.gif" width="550" />
298
+
299
+ You'll have to confirm a list of profiles / certificates that will be deleted.
300
+
301
+ ### Change Password
302
+
303
+ To change the password of your repo and therefore decrypting and encrypting all files run
304
+
305
+ ```no-highlight
306
+ fastlane match change_password
307
+ ```
308
+
309
+ You'll be asked for the new password on all your machines on the next run.
310
+
311
+ ### Manual Decrypt
312
+
313
+ If you want to manually decrypt a file you can.
314
+
315
+ ```no-highlight
316
+ openssl aes-256-cbc -k "<password>" -in "<fileYouWantToDecryptPath>" -out "<decryptedFilePath>" -a -d
317
+ ```
318
+
319
+
320
+ ## Is this secure?
321
+
322
+ Both your keys and provisioning profiles are encrypted using OpenSSL using a passphrase.
323
+
324
+ Storing your private keys in a Git repo may sound off-putting at first. We did an in-depth analysis of potential security issues and came to the following conclusions:
325
+
326
+ #### What could happen if someone stole a private key?
327
+
328
+ If attackers would have your certificate and provisioning profile, they could codesign an application with the same bundle identifier.
329
+
330
+ What's the worst that could happen for each of the profile types?
331
+
332
+ ##### App Store Profiles
333
+
334
+ An App Store profile can't be used for anything as long as it's not re-signed by Apple. The only way to get an app resigned is to submit an app for review which could take anywhere from 24 hours to a few days (checkout [appreviewtimes.com](http://appreviewtimes.com) for up-to-date expectations). Attackers could only submit an app for review, if they also got access to your iTunes Connect credentials (which are not stored in git, but in your local keychain). Additionally you get an email notification every time a build gets uploaded to cancel the submission even before your app gets into the review stage.
335
+
336
+ ##### Development and Ad Hoc Profiles
337
+
338
+ In general those profiles are harmless as they can only be used to install a signed application on a small subset of devices. To add new devices, the attacker would also need your Apple Developer Portal credentials (which are not stored in git, but in your local keychain).
339
+
340
+ ##### Enterprise Profiles
341
+
342
+ Attackers could use an In-House profile to distribute signed application to a potentially unlimited number of devices. All this would run under your company name and it could eventually lead to Apple revoking your In-House account. However it is very easy to revoke a certificate to remotely break the app on all devices.
343
+
344
+ Because of the potentially dangerous nature of In-House profiles please use _match_ with enterprise profiles with caution, ensure your git repository is private and use a secure password.
345
+
346
+ ##### To sum up
347
+
348
+ - You have full control over the access list of your Git repo, no third party service involved
349
+ - Even if your certificates are leaked, they can't be used to cause any harm without your iTunes Connect login credentials
350
+ - Use In-House enterprise profile with _match_ with caution
351
+ - If you use GitHub or Bitbucket we encourage enabling 2 factor authentication for all accounts that have access to the certificates repo
352
+ - The complete source code of _match_ is fully open source on [GitHub](https://github.com/fastlane/fastlane/tree/master/match)