In this tutorial series we will explore a rarely discussed (but highly valuable) process of
developing software that is disappointingly absent in the iOS and mobile world: Continuous Integration.
In a nutshell, Continuous Integration (CI) allows you to speed up the development and release process by constantly checking the code repository for build issues as well as automating a variety of procedures that you would otherwise have to perform yourself.
After reading this tutorial you will be able to set up from scratch an automated server that will provide all of the above benefits (plus a few more). Specifically, we will cover:
- The theory behind continuous integration.
- Installing the Tomcat Apache Webserver. This will be used to run the CI software.
- Installing Hudson. This is the CI software that will monitor the repository and start the
build. - Writing the bash build script.We will go through the basics of Bash and how to compile our Xcode project from the command line.
- Extending the build script in various ways, including automated deployment.
Required Knowledge
Although we will go into detail about all aspects of how to set up your CI, it is assumed you have no prior knowledge of server administration, bash scripting, or CI procedures. Having said that, it is expected that you have a general grasp on Xcode and archiving builds, and also that you understand (and have access to) a source control server.
If you are not already at the point where you are using a version control system such as Git or SVN for managing your code, this tutorial will be a little out of your comfort zone. To learn about source control and how it can benefit you, I highly recommend signing up to GitHub. They offer free public repositories and have a great tutorial for new users on how to set up and use Git as a VCS.
What Is Continuous Integration?
As anyone that has worked in a team of developers can attest, managing code repositories and code conflicts can be a huge pain. Developers can spend several hours after a merge managing and cleaning up conflicts.