Skip to content

bitrise-steplib/steps-export-xcarchive-mac

Repository files navigation

Export macOS Xcode archive

Step changelog

Export macOS Xcode archive

Description

This step exports an app (.app or .pkg from an existing macOS xcarchive. This is useful when one archive needs to be exported with different distribution methods without rebuilding the archive.

🧩 Get started

Add this step directly to your workflow in the Bitrise Workflow Editor.

You can also run this step directly with Bitrise CLI.

Example

This step exports an app from an existing xcarchive. This is useful when one archive needs to be exported with different distribution methods:

steps:
- certificate-and-profile-installer: {} # Requires certificates and profiles uploaded to Bitrise
- xcode-archive-mac:
    title: Archive and app store export
    inputs:
    - scheme: $BITRISE_SCHEME
    - export_method: app-store
- export-xcarchive-mac:
    title: Developer ID export
    inputs:
    - export_method: developer-id
    # Default input values of the step match the outputs of the previous step
- deploy-to-bitrise-io: {}

⚙️ Configuration

Inputs
Key Description Flags Default
archive_path Path to the macOS archive (.xcarchive) which should be exported. $BITRISE_MACOS_XCARCHIVE_PATH
export_method Describes how Xcode should export the archive. required development
upload_bitcode For App Store exports, should the package include bitcode? required yes
compile_bitcode For non-App Store exports, should Xcode re-compile the app from bitcode? required yes
team_id The Developer Portal team to use for this export. Format example: - 1MZX23ABCD4
custom_export_options_plist_content Specifies a custom export options plist content that configures archive exporting. If empty, step generates these options based on the embedded provisioning profile, with default values. Auto generated export options available for export methods: - app-store - ad-hoc - enterprise - development If step doesn't find export method based on provisioning profile, development will be use. Call xcodebuild -help for available export options.
use_legacy_export If this input is set to yes, the step will use legacy export method. required no
legacy_export_provisioning_profile_name If this input is empty, xcodebuild will grab one of the matching installed provisining profile.
legacy_export_output_format Specify export format required app
verbose_log Enable verbose logging? required no
Outputs
Environment Variable Description
BITRISE_APP_PATH The created macOS .app file's path
BITRISE_PKG_PATH The created macOS .pkg file's path
BITRISE_IDEDISTRIBUTION_LOGS_PATH Path to the xcdistributionlogs ZIP file

🙋 Contributing

We welcome pull requests and issues against this repository.

For pull requests, work on your changes in a forked repository and use the Bitrise CLI to run step tests locally.

Note: this step's end-to-end tests (defined in e2e/bitrise.yml) are working with secrets which are intentionally not stored in this repo. External contributors won't be able to run those tests. Don't worry, if you open a PR with your contribution, we will help with running tests and make sure that they pass.

Learn more about developing steps: