iOS programming in 2010

How to use SVN in XCode

Posted: December 26th, 2010 | Author: | Filed under: Xcode solutions | Comments Off on How to use SVN in XCode

It is quite common issue when we need to share our code with other developers or control versions of uploaded files. In corporate environment we usually have installed CVS or SVN. It may be also very helpful to use such environments in small companies or projects. One more advantage can also be, that we have backup on network drive in case of any issue with local storage.

How to install SVN quickly and start using it? The best approach would be to leverage systems delivered by our hosting provider. Dreamhost.com delivers ‘one-click install’ subversion. We just need to follow instruction displayed on the screen and after few minutes SVN is ready.
If we need just remote storage and files sharing – this is the only step we need to do. Now we need to install client on our machine OR we need to configure XCode.
For more advanced features we may configure additional access and scripts to deploy files on development, testing and production environments. Very good tutorial can be found on the page http://wiki.dreamhost.com/Subversion

There are few Mac clients for subversion. The most similar to Windows Tortoise SVN may be SCPlugin. Installation takes only few minutes and it gives all basic features. Installation is described on the page:
http://scplugin.tigris.org/

The best approach would be to configure repository directly in XCode. It gives direct access to all needed features and fully supports all features delivered in SCM – repositories management option of XCode. After installation we can use the “Commit” and “Update” commands (when you have files selected in the Groups & Files list) in the “SCM” menu in Xcode to download or upload changes to/from the repository.

To configure XCode:

  1. Open Xcode, and click “Preferences” under “Xcode”
  2. Select “SCM” option
  3. Click button “+” (add) under the “Repositories” to add new entry.
  4. Enter name, url, username and password. Xcode will also fill some wields automatically based on username, url and password.
  5. Choose your new repository from the list. Select it and click the “Checkout” button in the toolbar.

Comments are closed.