Skip to main content

Caching Swift packages

Branch-based caching vs key-based caching

This guide is is about legacy, branch-based caching. For key-based caching, check out our in-depth guide: Key-based caching.

  1. Open your app on Bitrise.

  2. Click the Workflows button on the main page.

    opening-workflow-editor.png
  3. Insert the Bitrise.io Cache:Pull Step after the Git Clone Step but before the Xcode build Steps.

    Step version of the Cache:Pull Step

    Make sure that your Step is version 1.0.0 or newer. With the older versions, you have to manually specify paths for caching.

  4. Make sure to enable Swift package caching in your Xcode build Step.

    For example, in the Xcode Archive & Export for iOS Step, you can enable caching by setting the Enable collecting cache content input to swift_packages under the Caching input group.

    caching_xcode.png
  5. Insert the Bitrise.io Cache:Push Step at the very end of your Workflow.