With several people working in teams on the final project I thought I’d post how to setup and user Subversion (SVN) with Xcode. Like other IDEs, Xcode allows you to perform version control from within the IDE.
The following was derived based on notes provided by Amy Ciavolino — thanks Amy!
Setting up a Repository
If you want to use SVN, you’ll need to have access to a SVN repository online somewhere. You could host your own SVN repository, or if you’re creating an open source project you could leverage Google Code which will provide free public SVN access. Setting up a new SVN repository with Google Code is pretty painless. Create a Projectto get started.
Adding a SVN Repository to Xcode
- To add an Xcode repository to Xcode select SCM (from the menubar) → Configure SCM Repositories…
- Under the Repositories tab, click + to add a new repository…
- Under Name enter the name you want to give the repository and be sure that Subversion is selected under SCM System
- Enter all of your SVN credentials into the dialog (substituting your own values)…
- If all goes well, you’ll see the repository added to your list of SCM repositories…
Importing a Project
- Before you can import, you’ll have to have added the SCM repository to Xcode
- From the repositories screen, select the Import button from the toolbar
- Browse to the folder that contains the Xcode project and select Import
- If all goes well you’ll get a message indicating that the import was successful…
Checking out a Project
- Before you can check out, you’ll have to have added the SCM repository to Xcode
- From the repositories screen, select the Checkout button from the toolbar
- Browse to the directory you want to store the project, select a name for the folder, then then select Checkout
- If the checkout goes well, you get a message asking if you want to open the checked out project in Xcode…
- You’ll need to do is to tell Xcode that you want to perform SCM operations against the repository you checked out from. To do so, select SCM (from the menubar) → Configure SCM For This Project
- From the General tab click the Configure Roots & SCM… button (top right)
- Select the repository from the drop-down that you’d like to perform operations against, then press OK like so…
- After having performed a checkout, various SCM functions are now available off of the SCM menu item (e.g. commit, update, diff, etc.)













