Using CocoaPods

Using Cocoapods to manage the dependencies of your project

Regular iOS projects should work out of the box with Nevercode. However, there might be some extra hassle when it comes to Cocoapods projects.


Most iOS developers today use Cocoapods for dependency management. While it is an excellent tool, it can be a bit tricky to set up correctly, especially in a CI environment.

The two most common mistakes developers make when working with Pods are:

  1. selecting a non-workspace project
  2. not marking their schemes as shared

Selecting the correct project

If your project is using Cocoapods, you must select the project name which ends with [workspace] in your build settings.

Selecting project ending with [workspace].

Selecting project ending with [workspace].

Similarly, the respective configuration name in the next drop-down must end with [scheme].

Sharing your schemes

Schemes that are not marked as shared in Xcode cannot be built outside of your local Xcode environment. This will affect any CI server like Nevercode as well.

Let’s walk through the process of sharing a scheme:

Navigate to Product-> Scheme -> Manage Schemes

Managing schemes.

Managing schemes.

You will then be shown a list of schemes, each marked as being shared or not.

Sharing schemes.

Sharing schemes.

Make sure that the shared checkbox is selected next to your scheme, then click OK.

Finally, once you have marked the scheme as shared, you will have to add the new files generated by Xcode to your git repository as well. In Xcode,

  1. Navigate to Source Control > Commit.
  2. Select the Shared Data folder.
  3. Enter your commit message in the text field.
  4. Select the Push to remote option.
  5. Click the Commit Files button.

Alternatively, you can commit and push the changes from the command line.

To let Nevercode detect the changes, rescan your project. You will then be able to select the shared scheme from the Target drop-down menu.

Rescanning build configurations.

Rescanning build configurations.