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 building CocoaPods projects.

CocoaPods

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 and scheme

If your project is using CocoaPods, you must select the project name which ends with [workspace] in your build settings. Similarly, the name of the respective configuration in the scheme drop-down must end with [scheme].

Selecting the correct project and scheme in build settings

Selecting the correct project and scheme in build settings

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.

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

  1. In Xcode, Navigate to Product > Scheme > Manage Schemes. You will then be shown a list of schemes, each of which will be either marked as Shared or not.
  2. Make sure to mark your scheme as Shared.
  3. Click Close to close the dialog.

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 and Push button.

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

To let Nevercode detect the changes, rescan your project by clicking the rescan icon next to the Main branch field. You will then be able to select the shared scheme from the Scheme drop-down.

Rescanning project

Rescanning project

Using CocoaPods


Using CocoaPods to manage the dependencies of your project

Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.