5

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
johan
  • 6,578
  • 6
  • 46
  • 68

2 Answers2

0

CocoaPods is really undependable with Xcode bots in general when the pod project is not being tracked by your SVN. I also do not track the pod project and have similar troubles with CocoaPods. If you are looking for a temporary fix, you can go to /Library/Server/Xcode/Data/BotRuns/Cache/5bbd629b-a843-42b0-8b52-256db7560be5/source/, run pod install from there and remove the pre-build script. Though if you update your Podfile or Podfile.lock, you will have to manually run pod install/pod update on the server again.

Chris
  • 1,663
  • 1
  • 15
  • 19
0

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.

Remizorrr
  • 2,322
  • 1
  • 17
  • 25