2
votes

I am just learning how to setup my continuous integration bots in xcode 5 and having a really bad time. First, I was having problems with code signing identities, but after reading this great blog post, that problem disappeared.

Post:

http://matt.vlasach.com/xcode-bots-hosted-git-repositories-and-automated-testflight-builds/#comment-21

Now, after fixing those errors, other errors appeared. Every time I integrate, I get a warning like this:

The file "Pods.xcconfig" couldn't be opened because there is no such file.

And I also get an error, saying a header for a pod is not found. I assume this error is a consequence of the previous warning.

Everything works perfect locally, running on devices, archiving, the problem only happens when i try to integrate with the bots.

Should I add something to the PodFile? or is it something on the osx server itself?

I really need help before I go crazy about this!!

Thank you.

2
Are you checking in your Pods folder? How are you running pod install? And have you looked at this thread on the google group groups.google.com/d/msg/cocoapods/eYL8QB3XjyQ/10nmCRN8YxoJMishieMoo

2 Answers

1
votes

Better solution is to add a new scheme, which is used only via server (duplicate your normal scheme). Then select option manage schemes, expand 'build' and add new Pre-action with following code:

cd ${SRCROOT}
echo "Installing Pods"
pod install

You can update and many other things over here. The only problem is that the build where it updates has old content, you have to once again tap integrate. Remember to keep this scheme shared.

--edit-- You ofc have to commit this and run bot on this scheme (you can change it in your server -> safari local xcode bot url -> settings -> scheme.

0
votes

You are receiving this error because your mac server doesn't have the pods created in the directory that the Xcode bot is checking them out into. This is as expected because it would be odd to check-in the results of the pod install into your source control system. I wasn't able to find a way for the BOT to run the pod install/update commands so I came up with the following workaround:

  • Ensure your bot is configured to NOT clean before each integration
  • Run your bot then search through the resulting logs for the path that files are being checked out to.
    • Search for "IDEDerivedDataPathOverride" That path will end in /DerivedData, if you look in the parent folder of that you will see a "source" folder. This is where your bot will continue to checkout updates for your project
    • Note: The source directory is owned by your server user, you will need to access it as that user. Use the su command to do so
  • Install cocoapods on your mac server if you haven't already
  • On the mac server, in the source directory found above, navigate to where your Podfile is located
  • Run pod install and ensure all your specified pods are installed
    • Double check the file permissions of the newly created pod directories and ensure they are owned by the same user as the other files. Use chown to fix if necessary
  • Fire off the Bot and watch it complete successfully!

The only issue with this solution is that if a clean is ever performed you will need to run pod install again. This was good enough for tonight, I'll have to look for a way to script the pod install later utilizing the Pre-actions in the Build section of the Scheme used in the bot definition.