Here are some steps that took me a little while to figure out when setting up Xcode Bots through OS X Server.
First, I was getting an error message about provisioning:
Command /bin/sh failed with exit code 1
No matching provisioning profile found: Your build settings specify a provisioning profile with the UUID "...", however, no such provisioning profile was found.
CodeSign error: code signing is required for product type 'Application' in SDK 'iOS 7.1'
So I needed to help Bots find the profile.
Adding the provisioning profile
Normally provisioning profiles are sync'd down by Xcode, but it didn't work for me for an enterprise profile.
So what I did to make Xcode Bots find my provisioning profile is to copy it from the command line. I first needed to create the directory because it didn't exist
sudo mkdir -p /Library/Server/Xcode/Data/ProvisioningProfiles
Note there's no space in ProvisioningProfiles in this case.
Then I just copied the .mobileprovision file into that newly created directory:
sudo cp ~/Downloads/my-profile.mobileprovision /Library/Server/Xcode/Data/ProvisioningProfiles/
That worked. Great. But now code signing wasn't working:
No codesigning identities found: No codesigning identities (i.e. certificate and private key pairs) that match the provisioning profile specified in your build settings ("my-profile") were found.
So now it's finding the provisioning profile, but not the key. I checked keychain access. The key was in my keychain, but it was in the Login keychain. Poking around in StackOverflow, apparently it has to be in the system keychain to be used by Bots. Here's how I finally figured out how to add it to the System keychain:
Keychain Access --> File --> Import Items... --> Destination Keychain: System
Double clicking the Certificates.p12 didn't work, but the menu path above seemed to import it into the right place. Kicked off another integration and the bot found both the provisioning profile and the signing identity successfully.
If this helped solve your Xcode 5.1 Bots problem, let me know in the comments. Otherwise, let me know in the comments and perhaps I will have seen the answer to your problem while researching this one.
Manhattan mobile software engineer.