-
Notifications
You must be signed in to change notification settings - Fork 0
/
step.yml
382 lines (332 loc) · 14.6 KB
/
step.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
title: Xcode Archive & Export for iOS
summary: Run the Xcode archive command and then export an .ipa from the archive.
description: |-
The Step archives your Xcode project by running the `xcodebuild archive` command and then exports the archive into an .ipa file with the `xcodebuild -exportArchive` command. This .ipa file can be shared, installed on test devices, or uploaded to the App Store Connect.
### Configuring the Step
Before you can use the Step, you need code signing files. Certificates must be uploaded to Bitrise while provisioning profiles should be either uploaded or, if using the iOS Auto Provisioning Step, downloaded from the Apple Developer Portal or generated automatically.
To configure the Step:
1. Make sure the **Project (or Workspace) path** input points to the correct location.
By default, you do not have to change this.
1. Set the correct value to the **Select method for export** input. If you use the **iOS Auto Provision** Step, the value of this input should be the same as the **Distribution type** input of that Step.
1. Make sure the target scheme is a valid, existing Xcode scheme.
1. Optionally, you can define a configuration type to be used (such as Debug or Release) in the **Configuration name** input.
By default, the selected Xcode scheme determines which configuration will be used. This option overwrites the configuration set in the scheme.
1. If you wish to use a different Developer portal team than the one set in your Xcode project, enter the ID in the **he Developer Portal team to use for this export** input.
### Troubleshooting
If the Step fails, check your code signing files first. Make sure they are the right type for your export method. For example, an `app-store` export method requires an App Store type provisioning profile and a Distribution certificate.
Check **Debug** for additional options to run the Step. The **Additional options for xcodebuild call** input allows you add any flags that the `xcodebuild` command supports.
Make sure the **Scheme name** and **Configuration name** inputs contain values that actually exist in your Xcode project.
### Useful links
- https://devcenter.bitrise.io/code-signing/ios-code-signing/create-signed-ipa-for-xcode/
- https://devcenter.bitrise.io/code-signing/ios-code-signing/resigning-an-ipa/
- https://devcenter.bitrise.io/deploy/ios-deploy/ios-deploy-index/
### Related Steps
- [Certificate and profile installer](https://www.bitrise.io/integrations/steps/certificate-and-profile-installer)
- [iOS Auto Provision](https://www.bitrise.io/integrations/steps/ios-auto-provision)
- [Deploy to iTunesConnect](https://www.bitrise.io/integrations/steps/deploy-to-itunesconnect-deliver)
website: https://github.com/bitrise-steplib/steps-xcode-archive
source_code_url: https://github.com/bitrise-steplib/steps-xcode-archive
support_url: https://github.com/bitrise-steplib/steps-xcode-archive/issues
project_type_tags:
- ios
- react-native
- flutter
type_tags:
- build
is_requires_admin_user: false
is_always_run: false
is_skippable: false
deps:
check_only:
- name: xcode
toolkit:
go:
package_name: github.com/bitrise-steplib/steps-xcode-archive
inputs:
- project_path: $BITRISE_PROJECT_PATH
opts:
title: "Project (or Workspace) path"
summary: ""
description: |-
A `.xcodeproj` or `.xcworkspace` path.
is_required: true
- scheme: $BITRISE_SCHEME
opts:
title: "Scheme name"
summary: ""
description: |-
The Scheme to use.
is_required: true
- configuration:
opts:
title: "Configuration name"
summary: ""
description: |-
(optional) The configuration to use. By default, your Scheme
defines which configuration (Debug, Release, ...) should be used,
but you can overwrite it with this option.
**Make sure that the Configuration you specify actually exists
in your Xcode Project**. If it does not (for example, if you have a typo
in the value of this input), Xcode will simply use the Configuration
specified by the Scheme and will silently ignore this parameter!
- export_method: "auto-detect"
opts:
title: "Select method for export"
summary: ""
description: |-
`auto-detect` option is **DEPRECATED** - use direct export methods!
Describes how Xcode should export the archive.
If you select `auto-detect`, the step will figure out proper export method
based on the provisioning profile embedded into the generated xcodearchive.
value_options:
- "auto-detect"
- "app-store"
- "ad-hoc"
- "enterprise"
- "development"
is_required: true
- team_id:
opts:
title: "The Developer Portal team to use for this export"
summary: ""
description: |-
The Developer Portal team to use for this export.
Optional, only required if you want to use a different team for
distribution, not the one you have set in your Xcode project.
Format example:
- `1MZX23ABCD4`
- compile_bitcode: "yes"
opts:
title: "Rebuild from bitcode"
summary: ""
description: |
For __non-App Store__ exports, should Xcode re-compile the app from bitcode?
value_options:
- "yes"
- "no"
is_required: true
- upload_bitcode: "yes"
opts:
title: "Include bitcode"
summary: ""
description: |-
For __App Store__ exports, should the package include bitcode?
value_options:
- "yes"
- "no"
is_required: true
- icloud_container_environment:
opts:
title: "iCloud container environment"
summary: ""
description: |-
If the app is using CloudKit, this configures the "com.apple.developer.icloud-container-environment" entitlement.
Available options vary depending on the type of provisioning profile used, but may include: Development and Production.
- disable_index_while_building: "yes"
opts:
title: Disable indexing during the build
summary: Could make the build faster by disabling the indexing during the build run.
description: |-
Could make the build faster by adding `COMPILER_INDEX_STORE_ENABLE=NO` flag to the `xcodebuild` command which will disable the indexing during the build.
Indexing is needed for
* Autocomplete
* Ability to quickly jump to definition
* Get class and method help by alt clicking.
Which are not needed in CI environment.
**Note:** In Xcode you can turn off the `Index-WhileBuilding` feature by disabling the `Enable Index-WhileBuilding Functionality` in the `Build Settings`.<br/>
In CI environment you can disable it by adding `COMPILER_INDEX_STORE_ENABLE=NO` flag to the `xcodebuild` command.
value_options:
- "yes"
- "no"
is_required: true
- cache_level: swift_packages
opts:
title: Enable caching of Swift Package Manager packages
description: |-
Available options:
- `none` : Disable caching
- `swift_packages` : Cache Swift PM packages added to the Xcode project
value_options:
- "none"
- "swift_packages"
is_required: true
- force_team_id:
opts:
category: Force Build Settings
title: "Force code signing with Development Team"
description: |-
Used for Xcode version 8 and above.
Force xcodebuild to use the specified Development Team (DEVELOPMENT_TEAM).
Format example:
- `1MZX23ABCD4`
- force_code_sign_identity:
opts:
category: Force Build Settings
title: "Force code signing with Code Signing Identity"
description: |-
Force xcodebuild to use specified Code Signing Identity (CODE_SIGN_IDENTITY).
Specify Code Signing Identity as full ID (e.g. `iPhone Developer: Bitrise Bot (VV2J4SV8V4)`)
or specify code signing group ( `iPhone Developer` or `iPhone Distribution` ).
You also have to **specify the Identity in the format it's stored in Xcode project settings**,
and **not how it's presented in the Xcode.app GUI**!
This means that instead of `iOS` (`iOS Distribution/Development`) you have to use
`iPhone` (`iPhone Distribution` or `iPhone Development`).
**The input is case sensitive**: `iPhone Distribution` works but `iphone distribution` does not!
- force_provisioning_profile_specifier:
opts:
category: Force Build Settings
title: "Force code signing with Provisioning Profile Specifier"
description: |-
Used for Xcode version 8 and above.
Force xcodebuild to use specified Provisioning Profile (PROVISIONING_PROFILE_SPECIFIER).
How to get your Provisioning Profile Specifier:
- In Xcode make sure you disabled `Automatically manage signing` on your project's `General` tab
- Now you can select your Provisioning Profile Specifier's name as `Provisioning Profile` input value on your project's `General` tab
- `force_provisioning_profile_specifier` input value build up by the Team ID and the Provisioning Profile Specifier name, separated with slash character ('/'): `TEAM_ID/PROFILE_SPECIFIER_NAME`
Format example:
- `1MZX23ABCD4/My Provisioning Profile`
- force_provisioning_profile:
opts:
category: Force Build Settings
title: "Force code signing with Provisioning Profile"
description: |-
Force xcodebuild to use specified Provisioning Profile (PROVISIONING_PROFILE).
Use Provisioning Profile's UUID. The profile's name is not accepted by xcodebuild.
How to get your UUID:
- In xcode select your project -> Build Settings -> Code Signing
- Select the desired Provisioning Profile, then scroll down in profile list and click on Other...
- The popup will show your profile's UUID.
Format example:
- `c5be4123-1234-4f9d-9843-0d9be985a068`
- custom_export_options_plist_content:
opts:
category: Debug
title: "Custom export options plist content"
description: |-
Used for Xcode version 7 and above.
Specifies a custom export options plist content that configures archive exporting.
If empty, the step generates these options based on provisioning profile,
with default values.
Auto generated export options available for export methods:
- app-store
- ad-hoc
- enterprise
- development
If the step doesn't find an export method based on the provisioning profile, the development method will be used.
Call `xcodebuild -help` for available export options.
- artifact_name: ${scheme}
opts:
category: Debug
title: "Generated Artifact Name"
description: |-
This name will be used as basename for the generated .xcarchive, .ipa and .dSYM.zip files.
- xcodebuild_options:
opts:
category: Debug
title: Additional options for xcodebuild call
description: |-
Options added to the end of the xcodebuild call.
You can use multiple options, separated by a space
character. Example: `-xcconfig PATH -verbose`
- workdir: $BITRISE_SOURCE_DIR
opts:
category: Debug
title: "Working directory"
summary: ""
description: |-
Working directory of the step.
You can leave it empty to leave the working directory unchanged.
- output_dir: $BITRISE_DEPLOY_DIR
opts:
category: Debug
title: "Output directory path"
summary: ""
description: |-
This directory will contain the generated .ipa and .dSYM.zip files.
is_required: true
- is_clean_build: "no"
opts:
category: Debug
title: "Do a clean Xcode build before the archive?"
value_options:
- "yes"
- "no"
is_required: true
- output_tool: xcpretty
opts:
category: Debug
title: Output tool
description: |-
If set to `xcpretty`, the xcodebuild output will be prettified by xcpretty.
If set to `xcodebuild`, only the last 20 lines of raw xcodebuild output will be visible in the build log.
The build log will always be added as an artifact.
value_options:
- xcpretty
- xcodebuild
is_required: true
- export_all_dsyms: "yes"
opts:
category: Debug
title: Export all dsyms
description: |-
If this input is set to `yes` step will collect every dsym (.app dsym and framwork dsyms) in a directory, zip it and export the zipped directory path.
Otherwise only .app dsym will be zipped and the zip path exported.
value_options:
- "yes"
- "no"
is_required: true
- verbose_log: "yes"
opts:
category: Debug
title: "Enable verbose logging?"
description: Enable verbose logging?
value_options:
- "yes"
- "no"
is_required: true
- use_deprecated_export: "no"
opts:
category: Debug
title: Use deprecated ipa export method?
description: |-
If this input is set to `yes`, step will use deprecated ipa export method.
value_options:
- "yes"
- "no"
is_required: true
outputs:
- BITRISE_IPA_PATH:
opts:
title: The created .ipa file's path
- BITRISE_APP_DIR_PATH:
opts:
title: The generated .app directory
- BITRISE_DSYM_DIR_PATH:
opts:
title: The created .dSYM dir's path
description: |-
If `export_all_dsyms` is set to `"yes"`, step will collect every dsym (.app dsym and framwork dsyms) in a directory and export the directory path.
Otherwise this environment points to the .app.DSYM directory path.
- BITRISE_DSYM_PATH:
opts:
title: The created .dSYM.zip file's path
description: |-
If `export_all_dsyms` is set to `"yes"`, step will collect every dsym (.app dsym and framwork dsyms) in a directory, zip it and export the zipped directory path.
Otherwise this environment points to the zipped .app.DSYM directory path.
- BITRISE_XCARCHIVE_PATH:
opts:
title: The created .xcarchive file's path
- BITRISE_XCARCHIVE_ZIP_PATH:
opts:
title: The created .xcarchive.zip file's path
description: |-
The created .xcarchive.zip file's path.
- BITRISE_XCODE_ARCHIVE_RAW_RESULT_TEXT_PATH:
opts:
title: The full, raw archive output file path
description: |-
This is the path of the raw archive results log file.
If `output_tool=xcpretty` and the archive fails this log will contain the archive output.
- BITRISE_IDEDISTRIBUTION_LOGS_PATH:
opts:
title: Path to the xcdistributionlogs