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,145 @@
1
+ <p align="center">
2
+ <img src="/img/actions/scan.png" height="110">
3
+ </p>
4
+
5
+ ###### The easiest way to run tests of your iOS and Mac app
6
+
7
+ _scan_ makes it easy to run tests of your iOS and Mac app on a simulator or connected device.
8
+
9
+ -------
10
+
11
+ <p align="center">
12
+ <a href="#whats-scan">Features</a> &bull;
13
+ <a href="#usage">Usage</a> &bull;
14
+ <a href="#scanfile">Scanfile</a>
15
+ </p>
16
+
17
+ -------
18
+
19
+ # What's scan?
20
+
21
+ ![https://pbs.twimg.com/media/CURcEpuWoAArE3d.png:large](https://pbs.twimg.com/media/CURcEpuWoAArE3d.png:large)
22
+
23
+ ### Before _scan_
24
+
25
+ ```no-highlight
26
+ xcodebuild \
27
+ -workspace MyApp.xcworkspace \
28
+ -scheme "MyApp" \
29
+ -sdk iphonesimulator \
30
+ -destination 'platform=iOS Simulator,name=iPhone 6,OS=8.1' \
31
+ test
32
+ ```
33
+
34
+ As the output will look like this
35
+
36
+ ```no-highlight
37
+ /Users/felixkrause/Library/Developer/Xcode/DerivedData/Example-fhlmxikmujknefgidqwqvtbatohi/Build/Intermediates/ArchiveIntermediates/Example/IntermediateBuildFilesPath/Example.build/Release-iphoneos/Example.build/Objects-normal/arm64/main.o Example/main.m normal arm64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
38
+ cd /Users/felixkrause/Developer/fastlane/gym/example/cocoapods
39
+ export LANG=en_US.US-ASCII
40
+ export PATH="/Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode-beta.app/Contents/Developer/usr/bin:/Users/felixkrause/.rvm/gems/ruby-2.2.0/bin:/Users/felixkrause/.rvm/gems/ruby-2.2.0@global/bin:/Users/felixkrause/.rvm/rubies/ruby-2.2.0/bin:/Users/felixkrause/.rvm/bin:/usr/local/heroku/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
41
+ /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x objective-c -arch arm64 -fmessage-length=126 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 -fcolor-diagnostics -std=gnu99 -fobjc-arc -fmodules -gmodules -fmodules-cache-path=/Users/felixkrause/Library/Developer/Xcode/DerivedData/ModuleCache -fmodules-prune-interval=86400 -fmodules-prune-after=345600 -fbuild-session-file=/Users/felixkrause/Library/Developer/Xcode/DerivedData/ModuleCache/Session.modulevalidation -fmodules-validate-once-per-build-session -Wnon-modular-include-in-framework-module -Werror=non-modular-include-in-framework-module -Wno-trigraphs -fpascal-strings -Os -fno-common -Wno-missing-field-initializers -Wno-missing-prototypes -Werror=return-type -Wunreachable-code -Wno-implicit-atomic-properties -Werror=deprecated-objc-isa-usage -Werror=objc-root-class -Wno-arc-repeated-use-of-weak -Wduplicate-method-match -Wno-missing-braces -Wparentheses -Wswitch -Wunused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wempty-body -Wconditional-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wconstant-conversion -Wint-conversion -Wbool-conversion -Wenum-conversion -Wshorten-64-to-32 -Wpointer-sign -Wno-newline-eof -Wno-selector -Wno-strict-selector-match -Wundeclared-selector -Wno-deprecated-implementations -DCOCOAPODS=1 -DNS_BLOCK_ASSERTIONS=1 -DOBJC_OLD_DISPATCH_PROTOTYPES=0 -isysroot /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.0.sdk -fstrict-aliasing -Wprotocol -Wdeprecated-declarations -miphoneos-version-min=9.0 -g -fvisibility=hidden -Wno-sign-conversion -fembed-bitcode -iquote /Users/felixkrause/Library/Developer/Xcode/DerivedData/Example-fhlmxikmujknefgidqwqvtbatohi/Build/Intermediates/ArchiveIntermediates/Example/IntermediateBuildFilesPath/Example.build/Release-iphoneos/Example.build/ExampleProductName-generated-files.hmap -I/Users/felixkrause/Library/Developer/Xcode/DerivedData/Example-fhlmxikmujknefgidqwqvtbatohi/Build/Intermediates/ArchiveIntermediates/Example/IntermediateBuildFilesPath/Example.build/Release-iphoneos/Example.build/ExampleProductName-own-target-headers.hmap -I/Users/felixkrause/Library/Developer/Xcode/DerivedData/Example-fhlmxikmujknefgidqwqvtbatohi/Build/Intermediates/ArchiveIntermediates/Example/IntermediateBuildFilesPath/Example.build/Release-iphoneos/Example.build/ExampleProductName-all-target-headers.hmap -iquote /Users/felixkrause/Library/Developer/Xcode/DerivedData/Example-fhlmxikmujknefgidqwqvtbatohi/Build/Intermediates/ArchiveIntermediates/Example/IntermediateBuildFilesPath/Example.build/Release-iphoneos/Example.build/ExampleProductName-project-headers.hmap -I/Users/felixkrause/Library/Developer/Xcode/DerivedData/Example-fhlmxikmujknefgidqwqvtbatohi/Build/Intermediates/ArchiveIntermediates/Example/BuildProductsPath/Release-iphoneos/include -I/Users/felixkrause/Developer/fastlane/gym/example/cocoapods/Pods/Headers/Public -I/Users/felixkrause/Developer/fastlane/gym/example/cocoapods/Pods/Headers/Public/HexColors -I/Users/felixkrause/Library/Developer/Xcode/DerivedData/Example-fhlmxikmujknefgidqwqvtbatohi/Build/Intermediates/ArchiveIntermediates/Example/IntermediateBuildFilesPath/Example.build/Release-iphoneos/Example.build/DerivedSources/arm64 -I/Users/felixkrause/Library/Developer/Xcode/DerivedData/Example-fhlmxikmujknefgidqwqvtbatohi/Build/Intermediates/ArchiveIntermediates/Example/IntermediateBuildFilesPath/Example.build/Release-iphoneos/Example.build/DerivedSources -F/Users/felixkrause/Library/Developer/Xcode/DerivedData/Example-fhlmxikmujknefgidqwqvtbatohi/Build/Intermediates/ArchiveIntermediates/Example/BuildProductsPath/Release-iphoneos -isystem /Users/felixkrause/Developer/fastlane/gym/example/cocoapods/Pods/Headers/Public -isystem /Users/felixkrause/Developer/fastlane/gym/example/cocoapods/Pods/Headers/Public/HexColors -MMD -MT dependencies -MF /Users/felixkrause/Library/Developer/Xcode/DerivedData/Example-fhlmxikmujknefgidqwqvtbatohi/Build/Intermediates/ArchiveIntermediates/Example/IntermediateBuildFilesPath/Example.build/Release-iphoneos/Example.build/Objects-normal/arm64/main.d --serialize-diagnostics /Users/felixkrause/Library/Developer/Xcode/DerivedData/Example-fhlmxikmujknefgidqwqvtbatohi/Build/Intermediates/ArchiveIntermediates/Example/IntermediateBuildFilesPath/Example.build/Release-iphoneos/Example.build/Objects-normal/arm64/main.dia -c /Users/felixkrause/Developer/fastlane/gym/example/cocoapods/Example/main.m -o /Users/felixkrause/Library/Developer/Xcode/DerivedData/Example-fhlmxikmujknefgidqwqvtbatohi/Build/Intermediates/ArchiveIntermediates/Example/IntermediateBuildFilesPath/Example.build/Release-iphoneos/Example.build/Objects-normal/arm64/main.o
42
+ ```
43
+ you'll probably want to use something like [xcpretty](https://github.com/supermarin/xcpretty), which will look like this:
44
+
45
+ ```no-highlight
46
+ set -o pipefail &&
47
+ xcodebuild \
48
+ -workspace MyApp.xcworkspace \
49
+ -scheme "MyApp" \
50
+ -sdk iphonesimulator \
51
+ -destination 'platform=iOS Simulator,name=iPhone 6,OS=8.1' \
52
+ test \
53
+ | xcpretty \
54
+ -r "html" \
55
+ -o "tests.html"
56
+ ```
57
+
58
+ ### With _scan_
59
+
60
+ ```no-highlight
61
+ fastlane scan
62
+ ```
63
+
64
+ ### Why _scan_?
65
+
66
+ _scan_ uses the latest APIs and tools to make running tests plain simple and offer a great integration into your existing workflow, like [fastlane](https://fastlane.tools) or Jenkins.
67
+
68
+ | | scan Features |
69
+ |----------|-----------------|
70
+ 🏁 | Beautiful inline build output while running the tests
71
+ 🚠 | Sensible defaults: Automatically detect the project, schemes and more
72
+ 📊 | Support for HTML, JSON and JUnit reports
73
+ 🔎 | Xcode duplicated your simulators again? _scan_ will handle this for you
74
+ 🔗 | Works perfectly with [fastlane](https://fastlane.tools) and other tools
75
+ 🚅 | Don't remember any complicated build commands, just _scan_
76
+ 🔧 | Easy and dynamic configuration using parameters and environment variables
77
+ 📢 | Beautiful slack notifications of the test results
78
+ 💾 | Store common build settings in a `Scanfile`
79
+ 📤 | The raw `xcodebuild` outputs are stored in `~/Library/Logs/scan`
80
+ 💻 | Supports both iOS and Mac applications
81
+ 👱 | Automatically switches to the [travis formatter](https://github.com/kattrali/xcpretty-travis-formatter) when running on Travis
82
+ 📖 | Helps you resolve common test errors like simulator not responding
83
+
84
+ _scan_ uses a plain `xcodebuild` command, therefore keeping 100% compatible with `xcodebuild`. To generate the nice output, _scan_ uses [xcpretty](https://github.com/supermarin/xcpretty). You can alway access the raw output in `~/Library/Logs/scan`.
85
+
86
+ ![img/actions/scanScreenshot.png](assets/scanScreenshot.png)
87
+ ![img/actions/slack.png](assets/slack.png)
88
+ ![img/actions/scanHTML.png](assets/scanHTML.png)
89
+ ![img/actions/scanHTMLFailing.png](assets/scanHTMLFailing.png)
90
+
91
+ # Usage
92
+
93
+ fastlane scan
94
+
95
+ That's all you need to run your tests. If you want more control, here are some available parameters:
96
+
97
+ fastlane scan --workspace "Example.xcworkspace" --scheme "AppName" --device "iPhone 6" --clean
98
+
99
+ If you need to use a different xcode install, use `xcode-select` or define `DEVELOPER_DIR`:
100
+
101
+ DEVELOPER_DIR="/Applications/Xcode6.2.app" scan
102
+
103
+ To run _scan_ on multiple devices via [fastlane](https://fastlane.tools), add this to your `Fastfile`:
104
+
105
+ ```ruby
106
+ scan(
107
+ workspace: "Example.xcworkspace",
108
+ devices: ["iPhone 6s", "iPad Air"]
109
+ )
110
+ ```
111
+
112
+ For a list of all available parameters use
113
+
114
+ fastlane action scan
115
+
116
+ To access the raw `xcodebuild` output open `~/Library/Logs/scan`
117
+
118
+ # Scanfile
119
+
120
+ Since you might want to manually trigger the tests but don't want to specify all the parameters every time, you can store your defaults in a so called `Scanfile`.
121
+
122
+ Run `fastlane scan init` to create a new configuration file. Example:
123
+
124
+ ```ruby
125
+ scheme "Example"
126
+ devices ["iPhone 6s", "iPad Air"]
127
+
128
+ clean true
129
+
130
+ output_types "html"
131
+ ```
132
+
133
+ # Automating the whole process
134
+
135
+ _scan_ works great together with [fastlane](https://fastlane.tools), which connects all deployment tools into one streamlined workflow.
136
+
137
+ Using _fastlane_ you can define a configuration like
138
+
139
+ ```ruby
140
+ lane :test do
141
+ scan(scheme: "Example")
142
+ end
143
+ ```
144
+
145
+ For more information visit the [fastlane GitHub page](https://github.com/fastlane/fastlane/tree/master/fastlane).
@@ -0,0 +1,145 @@
1
+ <p align="center">
2
+ <img src="/img/actions/screengrab.png" height="110">
3
+ </p>
4
+
5
+ ###### Automated localized screenshots of your Android app on every device
6
+
7
+ _screengrab_ generates localized screenshots of your Android app for different device types and languages for Google Play and can be uploaded using [_supply_](https://fastlane.tools/supply).
8
+
9
+ <img src="/img/actions/running-screengrab.gif" width="640">
10
+
11
+ ### Why should I automate this process?
12
+
13
+ - Create hundreds of screenshots in multiple languages on emulators or real devices, saving you hours
14
+ - Easily verify that localizations fit into labels on all screen dimensions to find UI mistakes before you ship
15
+ - You only need to configure it once for anyone on your team to run it
16
+ - Keep your screenshots perfectly up-to-date with every app update. Your customers deserve it!
17
+ - Fully integrates with [_fastlane_](https://fastlane.tools) and [_supply_](https://fastlane.tools/supply)
18
+
19
+ # Installation
20
+
21
+ Install the gem
22
+
23
+ ```no-highlight
24
+ sudo gem install fastlane
25
+ ```
26
+
27
+ ##### Gradle dependency
28
+ ```java
29
+ androidTestCompile 'tools.fastlane:screengrab:x.x.x'
30
+ ```
31
+
32
+ The latest version is [ ![Download](https://api.bintray.com/packages/fastlane/fastlane/screengrab/images/download.svg) ](https://bintray.com/fastlane/fastlane/screengrab/_latestVersion)
33
+
34
+ ##### Configuring your Manifest Permissions
35
+
36
+ Ensure that the following permissions exist in your **src/debug/AndroidManifest.xml**
37
+
38
+ ```xml
39
+ <!-- Allows unlocking your device and activating its screen so UI tests can succeed -->
40
+ <uses-permission android:name="android.permission.DISABLE_KEYGUARD"/>
41
+ <uses-permission android:name="android.permission.WAKE_LOCK"/>
42
+
43
+ <!-- Allows for storing and retrieving screenshots -->
44
+ <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
45
+ <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
46
+
47
+ <!-- Allows changing locales -->
48
+ <uses-permission android:name="android.permission.CHANGE_CONFIGURATION" />
49
+ ```
50
+
51
+ ##### Configuring your <a href="#ui-tests">UI Tests</a> for Screenshots
52
+
53
+ 1. Add `@ClassRule public static final LocaleTestRule localeTestRule = new LocaleTestRule();` to your tests class to handle automatic switching of locales
54
+ 2. To capture screenshots, add the following to your tests `Screengrab.screenshot("name_of_screenshot_here");` on the appropriate screens
55
+
56
+ # Generating Screenshots with Screengrab
57
+ - Then, before running `fastlane screengrab` you'll need a debug and test apk
58
+ - You can create your APKs with `./gradlew assembleDebug assembleAndroidTest`
59
+ - Once complete run `fastlane screengrab` in your app project directory to generate screenshots
60
+ - You will be prompted to provide any required parameters which are not in your **Screengrabfile** or provided as command line arguments
61
+ - Your screenshots will be saved to `fastlane/metadata/android` in the directory where you ran _screengrab_
62
+
63
+ ## Improved screenshot capture with UI Automator
64
+
65
+ As of _screengrab_ 0.5.0, you can specify different strategies to control the way _screengrab_ captures screenshots. The newer strategy delegates to [UI Automator](https://developer.android.com/topic/libraries/testing-support-library/index.html#UIAutomator) which fixes a number of problems compared to the original strategy:
66
+
67
+ * Shadows/elevation are correctly captured for Material UI
68
+ * Multi-window situations are correctly captured (dialogs, etc.)
69
+ * Works on Android N
70
+
71
+ However, UI Automator requires a device with **API level >= 18**, so it is not yet the default strategy. To enable it for all screenshots by default, make the following call before your tests run:
72
+
73
+ ```java
74
+ Screengrab.setDefaultScreenshotStrategy(new UiAutomatorScreenshotStrategy());
75
+ ```
76
+
77
+ ## Advanced Screengrabfile Configuration
78
+
79
+ Running `fastlane screengrab init` generated a Screengrabfile which can store all of your configuration options. Since most values will not change often for your project, it is recommended to store them there.
80
+
81
+ The `Screengrabfile` is written in Ruby, so you may find it helpful to use an editor that highlights Ruby syntax to modify this file.
82
+
83
+ ```ruby
84
+ # remove the leading '#' to uncomment lines
85
+
86
+ # app_package_name 'your.app.package'
87
+ # use_tests_in_packages ['your.screenshot.tests.package']
88
+
89
+ # app_apk_path 'path/to/your/app.apk'
90
+ # tests_apk_path 'path/to/your/tests.apk'
91
+
92
+ locales ['en-US', 'fr-FR', 'it-IT']
93
+
94
+ # clear all previously generated screenshots in your local output directory before creating new ones
95
+ clear_previous_screenshots true
96
+ ```
97
+
98
+ For more information about all available options run
99
+
100
+ ```no-highlight
101
+ fastlane action screengrab
102
+ ```
103
+
104
+ # Tips
105
+
106
+ ## UI Tests
107
+
108
+ Check out [Testing UI for a Single App](http://developer.android.com/training/testing/ui-testing/espresso-testing.html) for an introduction to using Espresso for UI testing.
109
+
110
+ ##### Example UI Test Class (Using JUnit4)
111
+ ```java
112
+ @RunWith(JUnit4.class)
113
+ public class JUnit4StyleTests {
114
+ @ClassRule
115
+ public static final LocaleTestRule localeTestRule = new LocaleTestRule();
116
+
117
+ @Rule
118
+ public ActivityTestRule<MainActivity> activityRule = new ActivityTestRule<>(MainActivity.class);
119
+
120
+ @Test
121
+ public void testTakeScreenshot() {
122
+ Screengrab.screenshot("before_button_click");
123
+
124
+ onView(withId(R.id.fab)).perform(click());
125
+
126
+ Screengrab.screenshot("after_button_click");
127
+ }
128
+ }
129
+
130
+ ```
131
+ There is an [example project](https://github.com/fastlane/fastlane/tree/master/screengrab/example/src/androidTest/java/tools/fastlane/localetester) showing how to use use JUnit 3 or 4 and Espresso with the screengrab Java library to capture screenshots during a UI test run.
132
+
133
+ Using JUnit 4 is preferable because of its ability to perform actions before and after the entire test class is run. This means you will change the device's locale far fewer times when compared with JUnit 3 running those commands before and after each test method.
134
+
135
+ When using JUnit 3 you'll need to add a bit more code:
136
+
137
+ - Use `LocaleUtil.changeDeviceLocaleTo(LocaleUtil.getTestLocale());` in `setUp()`
138
+ - Use `LocaleUtil.changeDeviceLocaleTo(LocaleUtil.getEndingLocale());` in `tearDown()`
139
+ - Use `Screengrab.screenshot("name_of_screenshot_here");` to capture screenshots at the appropriate points in your tests
140
+
141
+ If you're having trouble getting your device unlocked and the screen activated to run tests, try using `ScreenUtil.activateScreenForTesting(activity);` in your test setup.
142
+
143
+ ## Clean Status Bar
144
+
145
+ You can use [QuickDemo](https://github.com/PSPDFKit-labs/QuickDemo) to clean up the status bar for your screenshots.
@@ -0,0 +1,187 @@
1
+ <p align="center">
2
+ <img src="/img/actions/sigh.png" height="110">
3
+ </p>
4
+
5
+ ###### Because you would rather spend your time building stuff than fighting provisioning
6
+
7
+ _sigh_ can create, renew, download and repair provisioning profiles (with one command). It supports App Store, Ad Hoc, Development and Enterprise profiles and supports nice features, like auto-adding all test devices.
8
+
9
+ -------
10
+
11
+ <p align="center">
12
+ <a href="#features">Features</a> &bull;
13
+ <a href="#usage">Usage</a> &bull;
14
+ <a href="#resign">Resign</a> &bull;
15
+ <a href="#how-does-it-work">How does it work?</a>
16
+ </p>
17
+
18
+ -------
19
+
20
+ # Features
21
+
22
+ - **Download** the latest provisioning profile for your app
23
+ - **Renew** a provisioning profile, when it has expired
24
+ - **Repair** a provisioning profile, when it is broken
25
+ - **Create** a new provisioning profile, if it doesn't exist already
26
+ - Supports **App Store**, **Ad Hoc** and **Development** profiles
27
+ - Support for **multiple Apple accounts**, storing your credentials securely in the Keychain
28
+ - Support for **multiple Teams**
29
+ - Support for **Enterprise Profiles**
30
+
31
+ To automate iOS Push profiles you can use [pem](https://github.com/fastlane/fastlane/tree/master/pem).
32
+
33
+
34
+ ### Why not let Xcode do the work?
35
+
36
+ - _sigh_ can easily be integrated into your CI-server (e.g. Jenkins)
37
+ - Xcode sometimes invalidates [all existing profiles](assets/SignErrors.png)
38
+ - You have control over what happens
39
+ - You still get to have the signing files, which you can then use for your build scripts or store in git
40
+
41
+ See _sigh_ in action:
42
+
43
+ ![img/actions/sighRecording.gif](assets/sighRecording.gif)
44
+
45
+ # Usage
46
+
47
+ **Note**: It is recommended to use [match](https://github.com/fastlane/fastlane/tree/master/match) according to the [codesigning.guide](https://codesigning.guide) for generating and maintaining your provisioning profiles. Use _sigh_ directly only if you want full control over what's going on and know more about codesigning.
48
+
49
+ ```no-highlight
50
+ fastlane sigh
51
+ ```
52
+
53
+ Yes, that's the whole command!
54
+
55
+ _sigh_ will create, repair and download profiles for the App Store by default.
56
+
57
+ You can pass your bundle identifier and username like this:
58
+
59
+ fastlane sigh -a com.krausefx.app -u username
60
+
61
+ If you want to generate an **Ad Hoc** profile instead of an App Store profile:
62
+
63
+ fastlane sigh --adhoc
64
+
65
+ If you want to generate a **Development** profile:
66
+
67
+ fastlane sigh --development
68
+
69
+ To generate the profile in a specific directory:
70
+
71
+ fastlane sigh -o "~/Certificates/"
72
+
73
+ To download all your provisioning profiles use
74
+
75
+ fastlane sigh download_all
76
+
77
+ Optionally, use `fastlane sigh download_all --download_xcode_profiles` to also include the Xcode managed provisioning profiles
78
+
79
+ For a list of available parameters and commands run
80
+
81
+ fastlane action sigh
82
+
83
+ ### Advanced
84
+
85
+ By default, _sigh_ will install the downloaded profile on your machine. If you just want to generate the profile and skip the installation, use the following flag:
86
+
87
+ fastlane sigh --skip_install
88
+
89
+ To save the provisioning profile under a specific name, use the -q option:
90
+
91
+ fastlane sigh -a com.krausefx.app -u username -q "myProfile.mobileprovision"
92
+
93
+ If for some reason you don't want _sigh_ to verify that the code signing identity is installed on your local machine:
94
+
95
+ fastlane sigh --skip_certificate_verification
96
+
97
+ If you need the provisioning profile to be renewed regardless of its state use the `--force` option. This gives you a profile with the maximum lifetime. `--force` will also add all available devices to this profile.
98
+
99
+ fastlane sigh --force
100
+
101
+ By default, _sigh_ will include all certificates on development profiles, and first certificate on other types. If you need to specify which certificate to use you can either use the environment variable `SIGH_CERTIFICATE`, or pass the name or expiry date of the certificate as argument:
102
+
103
+ fastlane sigh -c "SunApps GmbH"
104
+
105
+ For a list of available parameters and commands run
106
+
107
+ fastlane action sigh
108
+
109
+
110
+ ### Use with [_fastlane_](https://github.com/fastlane/fastlane/tree/master/fastlane)
111
+
112
+ _sigh_ becomes really interesting when used in [_fastlane_](https://github.com/fastlane/fastlane/tree/master/fastlane) in combination with [_cert_](https://github.com/fastlane/fastlane/tree/master/cert).
113
+
114
+ Update your `Fastfile` to contain the following code:
115
+
116
+ ```ruby
117
+ lane :beta do
118
+ cert
119
+ sigh(force: true)
120
+ end
121
+ ```
122
+
123
+ `force: true` will make sure to re-generate the provisioning profile on each run.
124
+ This will result in _sigh_ always using the correct signing certificate, which is installed on the local machine.
125
+
126
+
127
+ # Repair
128
+
129
+ _sigh_ can automatically repair all your existing provisioning profiles which are expired or just invalid.
130
+
131
+ fastlane sigh repair
132
+
133
+ # Resign
134
+
135
+ If you generated your `ipa` file but want to apply a different code signing onto the ipa file, you can use `sigh resign`:
136
+
137
+ fastlane sigh resign
138
+
139
+ _sigh_ will find the ipa file and the provisioning profile for you if they are located in the current folder.
140
+
141
+ You can pass more information using the command line:
142
+
143
+ fastlane sigh resign ./path/app.ipa --signing_identity "iPhone Distribution: Felix Krause" -p "my.mobileprovision"
144
+
145
+ # Manage
146
+
147
+ With `sigh manage` you can list all provisioning profiles installed locally.
148
+
149
+ fastlane sigh manage
150
+
151
+ Delete all expired provisioning profiles
152
+
153
+ fastlane sigh manage -e
154
+
155
+ Or delete all `iOS Team Provisioning Profile` by using a regular expression
156
+
157
+ fastlane sigh manage -p "iOS\ ?Team Provisioning Profile:"
158
+
159
+ ## Environment Variables
160
+
161
+ Run `fastlane action sigh` to get a list of all available environment variables.
162
+
163
+ If you're using [cert](https://github.com/fastlane/fastlane/tree/master/cert) in combination with [fastlane](https://github.com/fastlane/fastlane/tree/master/fastlane) the signing certificate will automatically be selected for you. (make sure to run _cert_ before _sigh_)
164
+
165
+ # How does it work?
166
+
167
+ _sigh_ will access the `iOS Dev Center` to download, renew or generate the `.mobileprovision` file. It uses [spaceship](https://spaceship.airforce) to communicate with Apple's web services.
168
+
169
+ ## How is my password stored?
170
+ _sigh_ uses the [CredentialsManager](https://github.com/fastlane/fastlane/tree/master/credentials_manager) from _fastlane_.
171
+
172
+ # Tips
173
+
174
+
175
+ ## Use the 'Provisioning Quicklook plugin'
176
+ Download and install the [Provisioning Plugin](https://github.com/chockenberry/Provisioning).
177
+
178
+ It will show you the `mobileprovision` files like this:
179
+ ![img/actions/QuickLookScreenshot.png](assets/QuickLookScreenshot.png)
180
+
181
+ ## App Identifier couldn't be found
182
+
183
+ If you also want to create a new App Identifier on the Apple Developer Portal, check out [produce](https://github.com/fastlane/fastlane/tree/master/produce), which does exactly that.
184
+
185
+ ## What happens to my Xcode managed profiles?
186
+
187
+ _sigh_ will never touch or use the profiles which are created and managed by Xcode. Instead _sigh_ will manage its own set of provisioning profiles.