Run CocoaPods install

Step changelog

This Step uses CocoaPods' pod install or pod update command to install your dependencies.

Description

CocoaPods is a dependency manager for Swift and Objective-C projects. This Step uses CocoaPods' pod install or pod update command to install your dependencies on the virtual machine where your Bitrise build runs.

CocoaPods version is determined based on the Podfile.lock file or on the Gemfile.lock file. If your Gemfile.lock file contains the cocoapods gem, then the Step will call the pod install command with bundle exec. Otherwise, the Cocoapods version in the Podfile.lock will be installed as a global gem. If no Cocoapods version is defined in Podfile.lock or Gemfile.lock, the preinstalled sytem Cocoapods version will be used.

Configuring the Step

  1. Set the Source Code Directory path to the path of your app's source code.

  2. Optionally, provide a Podfile in the Podfile path input.

    Without a specific Podfile, the Step does a recursive search for the Podfile in the root of your app's directory, and uses the first Podfile it finds.

Troubleshooting

If the Step fails, check out the Podfile and the Gemfile of your app. Make sure there is no compatibility issue with the different versions of your Pods.

Check that both Podfile.lock and Gemfile.lock is committed and the Cocoapods versions defined in both match.

You can set the Execute cocoapods in verbose mode? input to true to get detailed logs of the Step.

Useful links

Related Steps

🧩 Get started

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

You can also run this step directly with Bitrise CLI.

⚙️ Configuration

Inputs
Key Description Flags Default
command CocoaPods command to use for installing dependencies. Available options: - install: Use pod install to download the explicit version listed in the Podfile.lock without trying to check if a newer version is available. - update: Use pod update to update every Pod listed in your Podfile to the latest version possible. required install
source_root_path Directory path where the project's Podfile (and optionally Gemfile) is placed. CocoaPods commands will be executed in this directory. required $BITRISE_SOURCE_DIR
podfile_path Path of the project's Podfile. By specifying this input Workdir gets overriden by the provided file's directory path.
verbose Execute all CocoaPods commands in verbose mode. If enabled the --verbose flag will be appended to all CocoaPods commands. false
is_cache_disabled Disables automatic cache content collection. By default the Step adds the Pods directory in the Workdir to the Bitrise Build Cache. Set this input to disable automatic cache item collection for this Step. false
Outputs There are no outputs defined in this step

🙋 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.

Learn more about developing steps: