Search code examples
continuous-integrationxcode5cocoapodsxcode-bots

continuous integration with XCode bots and cocoapods


I'm having problems with bots occasionally failing when building. A pre build action is used to install the pods, this works well some times. However when the integration fails it's because of this error:

Installing Pods
Analyzing dependencies
Downloading dependencies
[32mInstalling AFNetworking (1.3.3)[0m
...
2014-03-07 10:40:25.667 xcodebuild[76637:100b] [MT] IDEFileReferenceDebug: [Load] <IDEFileReference, 0x7fa3fe5b0840: group:Pods/Pods.xcodeproj> Failed to load container at path: /Library/Server/Xcode/Data/BotRuns/Cache/5bbd629b-a843-42b0-8b52-256db7560be5/source/Pods/Pods.xcodeproj, Error: Error Domain=Xcode3ProjectErrorDomain Code=2 "Project /Library/Server/Xcode/Data/BotRuns/Cache/5bbd629b-a843-42b0-8b52-256db7560be5/source/Pods/Pods.xcodeproj cannot be opened because it is missing its project.pbxproj file." UserInfo=0x7fa3fe7e54b0 {NSLocalizedDescription=Project /Library/Server/Xcode/Data/BotRuns/Cache/5bbd629b-a843-42b0-8b52-256db7560be5/source/Pods/Pods.xcodeproj cannot be opened because it is missing its project.pbxproj file.}
Generating Pods project
Integrating client project

So my guess is that xcodebuld tries to read the Pods-project before it's done being generated.

Does this sound like a reasonable guess?

And would anyone know how to solve it?

EDIT Pre-action build script looks lie this

cd $SRCROOT

export LC_ALL="en_US.UTF-8"

if [ -d Pods ]
then
echo "Updating Pods"
pod update
else
echo "Installing Pods"
pod install

Solution

  • I made the xCode server work with cocoapods pretty seamlessly, have a look at my article, it may help you.

    http://papaanton.com/setting-up-xcode-6-and-apple-server-4-0-for-continues-integration-with-cocoapods/

    I do the clean build every time with Pod install.

    It maybe the reason.