Using the xcodebuild command it is fairly simple to build iPhone projects on a Mac based build server. However an issue I run into, when building a new project is that I need to install the provisioning profile on the machine.
I think it is not a very good practise to check in the provisioning profile along with the code (Is that right?). So how do I make sure that at build time the provisioning profiles are available via some sort of automated mechanism.
You could check the certificates and the private key into your source code control system assuming that they aren’t publicly available.
Other than that there are two options, either use an automated system builder type tool, such as Chef or roll your own shell script to set up build machines.
You could create a Chef recipe that builds a new Jenkins based CI server, downloads the provisioning profile (and the private key) from an internal server and installs it into the Jenkins user’s
Library/MobileDevices/Provisioning Profilesdirectory (and login.keychain) on the new CI server.You could also automate this part of the setup of the server using a shell script: