Skip to content

Commit 08247fb

Browse files
committed
remove tool docs from action
1 parent 7312152 commit 08247fb

File tree

1 file changed

+1
-245
lines changed

1 file changed

+1
-245
lines changed

docs/actions/build_ios_app.md

Lines changed: 1 addition & 245 deletions
Original file line numberDiff line numberDiff line change
@@ -6,255 +6,11 @@ To modify it, go to its source at https://github.com/fastlane/fastlane/blob/mast
66
# build_ios_app
77

88

9-
Easily build and sign your app (via _gym_)
9+
This action uses the [`gym`](../tools/gym.md) tool to build your iOS app.
1010

1111

1212

1313

14-
<p align="center">
15-
<img src="/img/actions/gym.png" width="250">
16-
</p>
17-
18-
-------
19-
20-
<p align="center">
21-
<a href="#whats-gym">Features</a> &bull;
22-
<a href="#usage">Usage</a> &bull;
23-
<a href="#tips">Tips</a>
24-
</p>
25-
26-
-------
27-
28-
<h5 align="center"><code>gym</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>
29-
30-
# What's gym?
31-
32-
_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 💪
33-
34-
_gym_ is a replacement for [shenzhen](https://github.com/nomad/shenzhen).
35-
36-
### Before _gym_
37-
38-
```no-highlight
39-
xcodebuild clean archive -archivePath build/MyApp \
40-
-scheme MyApp
41-
xcodebuild -exportArchive \
42-
-exportFormat ipa \
43-
-archivePath "build/MyApp.xcarchive" \
44-
-exportPath "build/MyApp.ipa" \
45-
-exportProvisioningProfile "ProvisioningProfileName"
46-
```
47-
48-
### With _gym_
49-
50-
```no-highlight
51-
fastlane gym
52-
```
53-
54-
### Why _gym_?
55-
56-
_gym_ uses the latest APIs to build and sign your application which results in much faster build times.
57-
58-
| | Gym Features |
59-
|----------|----------------|
60-
🚀 | _gym_ builds 30% faster than other build tools like [shenzhen](https://github.com/nomad/shenzhen)
61-
🏁 | Beautiful inline build output
62-
📖 | Helps you resolve common build errors like code signing issues
63-
🚠 | Sensible defaults: Automatically detect the project, its schemes and more
64-
🔗 | Works perfectly with [_fastlane_](https://fastlane.tools) and other tools
65-
📦 | Automatically generates an `ipa` and a compressed `dSYM` file
66-
🚅 | Don't remember any complicated build commands, just _gym_
67-
🔧 | Easy and dynamic configuration using parameters and environment variables
68-
💾 | Store common build settings in a `Gymfile`
69-
📤 | All archives are stored and accessible in the Xcode Organizer
70-
💻 | Supports both iOS and Mac applications
71-
72-
![/img/actions/gymScreenshot.png](/img/actions/gymScreenshot.png)
73-
74-
-----
75-
76-
![/img/actions/gym.gif](/img/actions/gym.gif)
77-
78-
# Usage
79-
80-
```no-highlight
81-
fastlane gym
82-
```
83-
84-
That's all you need to build your application. If you want more control, here are some available parameters:
85-
86-
```no-highlight
87-
fastlane gym --workspace "Example.xcworkspace" --scheme "AppName" --clean
88-
```
89-
90-
If you need to use a different Xcode installation, use `xcode-select` or define `DEVELOPER_DIR`:
91-
92-
```no-highlight
93-
DEVELOPER_DIR="/Applications/Xcode6.2.app" fastlane gym
94-
```
95-
96-
For a list of all available parameters use
97-
98-
```no-highlight
99-
fastlane action gym
100-
```
101-
102-
If you run into any issues, use the `verbose` mode to get more information
103-
104-
```no-highlight
105-
fastlane gym --verbose
106-
```
107-
108-
Set the right export method if you're not uploading to App Store or TestFlight:
109-
110-
```no-highlight
111-
fastlane gym --export_method ad-hoc
112-
```
113-
114-
To pass boolean parameters make sure to use _gym_ like this:
115-
116-
```no-highlight
117-
fastlane gym --include_bitcode true --include_symbols false
118-
```
119-
120-
To access the raw `xcodebuild` output open `~/Library/Logs/gym`
121-
122-
# Gymfile
123-
124-
Since you might want to manually trigger a new build but don't want to specify all the parameters every time, you can store your defaults in a so called `Gymfile`.
125-
126-
Run `fastlane gym init` to create a new configuration file. Example:
127-
128-
```ruby-skip-tests
129-
scheme("Example")
130-
131-
sdk("iphoneos9.0")
132-
133-
clean(true)
134-
135-
output_directory("./build") # store the ipa in this folder
136-
output_name("MyApp") # the name of the ipa file
137-
```
138-
139-
## Export options
140-
141-
Since Xcode 7, _gym_ is using new Xcode API which allows us to specify export options using `plist` file. By default _gym_ creates this file for you and you are able to modify some parameters by using `export_method`, `export_team_id`, `include_symbols` or `include_bitcode`. If you want to have more options, like creating manifest file for app thinning, you can provide your own `plist` file:
142-
143-
```ruby-skip-tests
144-
export_options("./ExportOptions.plist")
145-
```
146-
147-
or you can provide hash of values directly in the `Gymfile`:
148-
149-
```ruby-skip-tests
150-
export_options = {
151-
method: "ad-hoc",
152-
manifest: {
153-
appURL: "https://example.com/My App.ipa",
154-
},
155-
thinning: "<thin-for-all-variants>"
156-
}
157-
```
158-
159-
Optional: If _gym_ can't automatically detect the provisioning profiles to use, you can pass a mapping of bundle identifiers to provisioning profiles:
160-
161-
```ruby-skip-tests
162-
export_options: {
163-
method: "app-store",
164-
provisioningProfiles: {
165-
"com.example.bundleid" => "Provisioning Profile Name",
166-
"com.example.bundleid2" => "Provisioning Profile Name 2"
167-
}
168-
}
169-
```
170-
171-
**Note**: If you use [_fastlane_](https://fastlane.tools) with [_match_](https://fastlane.tools/match) you don't need to provide those values manually.
172-
173-
For the list of available options run `xcodebuild -help`.
174-
175-
## Setup code signing
176-
177-
- [More information on how to get started with codesigning](https://docs.fastlane.tools/codesigning/getting-started/)
178-
- [Docs on how to set up your Xcode project](https://docs.fastlane.tools/codesigning/xcode-project/)
179-
180-
## Automating the whole process
181-
182-
_gym_ works great together with [_fastlane_](https://fastlane.tools), which connects all deployment tools into one streamlined workflow.
183-
184-
Using _fastlane_ you can define a configuration like
185-
186-
```ruby
187-
lane :beta do
188-
scan
189-
gym(scheme: "MyApp")
190-
crashlytics
191-
end
192-
193-
# error block is executed when a error occurs
194-
error do |lane, exception|
195-
slack(
196-
# message with short human friendly message
197-
message: exception.to_s,
198-
success: false,
199-
# Output containing extended log output
200-
payload: { "Output" => exception.error_info.to_s }
201-
)
202-
end
203-
```
204-
205-
When _gym_ raises an error the `error_info` property will contain the process output
206-
in case you want to display the error in 3rd party tools such as Slack.
207-
208-
You can then easily switch between the beta provider (e.g. `testflight`, `hockey`, `s3` and more).
209-
210-
# How does it work?
211-
212-
_gym_ uses the latest APIs to build and sign your application. The 2 main components are
213-
214-
- `xcodebuild`
215-
- [xcpretty](https://github.com/supermarin/xcpretty)
216-
217-
When you run _gym_ without the `--silent` mode it will print out every command it executes.
218-
219-
To build the archive _gym_ uses the following command:
220-
221-
```no-highlight
222-
set -o pipefail && \
223-
xcodebuild -scheme 'Example' \
224-
-project './Example.xcodeproj' \
225-
-configuration 'Release' \
226-
-destination 'generic/platform=iOS' \
227-
-archivePath '/Users/felixkrause/Library/Developer/Xcode/Archives/2015-08-11/ExampleProductName 2015-08-11 18.15.30.xcarchive' \
228-
archive | xcpretty
229-
```
230-
231-
After building the archive it is being checked by _gym_. If it's valid, it gets packaged up and signed into an `ipa` file.
232-
233-
_gym_ automatically chooses a different packaging method depending on the version of Xcode you're using.
234-
235-
### Xcode 7 and above
236-
237-
```no-highlight
238-
/usr/bin/xcrun path/to/xcbuild-safe.sh -exportArchive \
239-
-exportOptionsPlist '/tmp/gym_config_1442852529.plist' \
240-
-archivePath '/Users/fkrause/Library/Developer/Xcode/Archives/2015-09-21/App 2015-09-21 09.21.56.xcarchive' \
241-
-exportPath '/tmp/1442852529'
242-
```
243-
244-
_gym_ makes use of the new Xcode 7 API which allows us to specify the export options using a `plist` file. You can find more information about the available options by running `xcodebuild --help`.
245-
246-
Using this method there are no workarounds for WatchKit or Swift required, as it uses the same technique Xcode uses when exporting your binary.
247-
248-
Note: the [xcbuild-safe.sh script](https://github.com/fastlane/fastlane/blob/master/gym/lib/assets/wrap_xcodebuild/xcbuild-safe.sh) wraps around xcodebuild to workaround some incompatibilities.
249-
250-
## Use 'ProvisionQL' for advanced Quick Look in Finder
251-
252-
Install [ProvisionQL](https://github.com/ealeksandrov/ProvisionQL).
253-
254-
It will show you `ipa` files like this:
255-
![img/actions/QuickLookScreenshot-App.png](/img/actions/QuickLookScreenshot-App.png)
256-
257-
<hr />
25814

25915

26016
build_ios_app ||

0 commit comments

Comments
 (0)