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.
With this Step, you can use automatic code signing in a CI environment without having to use Xcode.
In short, the Step:
- Logs you into your Apple Developer account based on the Apple service connection you provide on Bitrise.
- Downloads any provisioning profiles needed for your project based on the Distribution method.
- Runs your build. It archives your Xcode project by running the
xcodebuild archive command and exports the archive into an .ipa file with the xcodebuild -exportArchive command.
This .ipa file can be shared and installed on test devices, or uploaded to App Store Connect.
Configuring the Step
Before you start:
- Make sure you have connected your Apple Service account to Bitrise.
Alternatively, you can upload certificates and profiles to Bitrise manually, then use the Certificate and Profile installer step before Xcode Archive
- Make sure certificates are uploaded to Bitrise's Code Signing tab. The right provisioning profiles are automatically downloaded from Apple as part of the automatic code signing process.
To configure the Step:
- Project path: Add the path where the Xcode Project or Workspace is located.
- Scheme: Add the scheme name you wish to archive your project later.
- Distribution method: Select the method Xcode should sign your project: development, app-store, ad-hoc, or enterprise.
Under xcodebuild configuration:
- Build configuration: Specify Xcode Build Configuration. The Step uses the provided Build Configuration's Build Settings to understand your project's code signing configuration. If not provided, the Archive action's default Build Configuration will be used.
- Build settings (xcconfig): Build settings to override the project's build settings. Can be the contents, file path or empty.
- Perform clean action: If this input is set, a
clean xcodebuild action will be performed besides the archive action.
Under Xcode build log formatting:
- Log formatter: Defines how
xcodebuild command's log is formatted. Available options are xcbeautify: The xcodebuild command's output will be beautified by xcbeautify. xcodebuild: Only the last 20 lines of raw xcodebuild output will be visible in the build log.
The raw xcodebuild log is exported in both cases.
Under Automatic code signing:
- Automatic code signing method: Select the Apple service connection you want to use for code signing. Available options:
off if you don't do automatic code signing, api-key if you use API key authorization, and apple-id if you use Apple ID authorization.
- Register test devices on the Apple Developer Portal: If this input is set, the Step will register the known test devices on Bitrise from team members with the Apple Developer Portal. Note that setting this to
yes may cause devices to be registered against your limited quantity of test devices in the Apple Developer Portal, which can only be removed once annually during your renewal window.
- The minimum days the Provisioning Profile should be valid: If this input is set to >0, the managed Provisioning Profile will be renewed if it expires within the configured number of days. Otherwise the Step renews the managed Provisioning Profile if it is expired.
- The Code signing certificate URL, the Code signing certificate passphrase, the Keychain path, and the Keychain password inputs are automatically populated if certificates are uploaded to Bitrise's Code Signing tab. If you store your files in a private repo, you can manually edit these fields.
If you want to set the Apple service connection credentials on the step-level (instead of using the one configured in the App Settings), use the Step inputs in the App Store Connect connection override category. Note that this only works if Automatic code signing method is set to api-key.
Under IPA export configuration:
- Developer Portal team: Add the Developer Portal team's name to use for this export. This input defaults to the team used to build the archive.
- Rebuild from bitcode: For non-App Store exports, should Xcode re-compile the app from bitcode?
- Include bitcode: For App Store exports, should the package include bitcode?
- iCloud container environment: If the app is using CloudKit, this input 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.
- Export options plist content: Specifies a
plist file content that configures archive exporting. If not specified, the Step will auto-generate it.
Under Step Output Export configuration:
- Output directory path: This directory will contain the generated artifacts.
- Export all dSYMs: Export additional dSYM files besides the app dSYM file for Frameworks.
- Override generated artifact names: This name is used as basename for the generated Xcode archive, app,
.ipa and dSYM files. If not specified, the Product Name (PRODUCT_NAME) Build settings value will be used. If Product Name is not specified, the Scheme will be used.
Under Debugging:
- Verbose logging*: You can set this input to
yes to produce more informative logs.
Caching: