icon

Xcode Archive for Mac

Create an archive for your macOS project

The Step creates an archive using the xcodebuild archive command for your macOS project so you can share it, upload it, or deploy it.

Configuring the Step

Before you start:

Make sure your certificates are uploaded to Bitrise's Code Signing tab.

To configure the Step:

Under app/pkg export configs:

  1. Select the signing method for your project Xcode should use in the Export method input.
  2. (Optional) Specify a custom export option in the Custom export options plist content input. If you leave this input blank or the Step doesn't find an export method based on the provisioning profile(s), the Step will use the development method.

Under xcodebuild configs:

  1. Add the path where your Xcode Project or Workspace is located in the Project (or Workspace) path input.
  2. Add the scheme name you want to use to archive your project in the Scheme name input.
  3. (Optional) By default, your Scheme defines which configuration is used, but you can override this option in the Configuration name input.
  4. In the Clean build before archive input, select yes, if you want to run a clean xcodebuild before the archive action. Select no to skip this.
  5. (Optional) If you wish to make your build times faster, and you don't need indexing, consider turning it off by setting Disable indexing during the build input to yes.

Under force archive codesign settings:

  1. (Optional) If you want to force xcodebuild to use specified code sign identities or provisioning profiles, you can do so in the inputs under the force archive codesign settings tab.

Under step output configs:

  1. Select an xcodebuild command log format in the Output tool input. Available options are xcpretty: The xcodebuild command's output will be prettified by xcpretty, and 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.
  2. Specify which directory will contain the generated .app or .pkg files and the .dSYM.zip files in the Output directory input.
  3. Provide a name to use as a basename for the generated files in the Generated Artifact Name input.
  4. If you want to export the archive, set the Export the generated archive? input to yes. This will compress the generated files into a zip file and move them to a folder output_dir.
  5. If you want to export the dsyms, set the Export all dsyms? input to yes.
  6. Set Enable verbose logging input to yes to produce more informative logs.

Troubleshooting

If you receive an error about missing signing certificates during this Step, make sure that your certificates are uploaded to Bitrise's Code Signing tab.

Useful links

Related Steps

Similar steps

Automatically manages your code signing assets, archives and exports an .ipa in one Step.

Export iOS and tvOS IPA from an existing Xcode archive

Export macOS Xcode archive

Runs Xcode's test action for macOS app projects.