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.
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:
- selecting a non-workspace project
- not marking their schemes as shared
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
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:
- 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.
- Make sure to mark your scheme as Shared.
- 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.
- Navigate to Source Control > Commit.
- Select the Shared Data folder.
- Enter your commit message in the text field.
- Select the Push to remote option.
- 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.
Updated about a year ago