user843337
user843337

Reputation:

How to setup SVN repository in XCode?

I have got to the point with developing iPhone apps that I need a way of managing versions. I have looked into the ways to do this through Xcode and I see that I can either go down the path of using GIT or SVN.

In the past I have used SVN which is the reason I'm more inclined to go down this path (I'm open to using GIT if people feel it is better than SVN). My question is related to the setup of a repository in Xcode.

I have done a fair amount of research and I have found several useful tutorials, however a lot of the seem to be outdated.

My question is 2-fold:

  1. Please can someone advise on the steps to setup a repository through Xcode?
  2. I notice Xcode requires me to set the location of the repository. I'm not sure what to do here, since I don't have my own server. Is there a way I can get around this? Can I setup a local repository somehow (if so how? if not what are my other options?)?

enter image description here

Thanks in advance for any help or advice people can offer.

Upvotes: 6

Views: 6294

Answers (5)

Nas Banov
Nas Banov

Reputation: 29018

It's actually very easy to setup a local SVN repository on your Mac and reap the benefits of version control without remote/networked repository.

See e.g. explanation here https://stackoverflow.com/a/10039004/226086 Then the path you give Xcode is wherever you set up the repository, say file:///Users/Shared/subversion/ - under Preferences/Accounts/Add Repository, when it asks "Enter repository address".

Upvotes: 0

Evan Mulawski
Evan Mulawski

Reputation: 55354

If you have a home server (or company server), I would use uberSVN. The guided installation is extremely simple. I actually use this to keep all of my Xcode projects under version control.

Screenshot

Steps:

  1. Install an SVN client. (Bottom-right of the page. You can choose 1.6 or 1.7, and your OS via the tabs on the top of the page).
  2. Install uberSVN.

Upvotes: 1

Darshan Prajapati
Darshan Prajapati

Reputation: 843

I think you should go with using GIT. You can create free repository on bitbucket.org

It allows you to create free account which can be used using 5 members of your team. If you want more you need to pay.

Once you are done with creating repo. just check it out on your pc. There are steps given on that site how to do that. Then in the folder which you checked out, create your XCode project. Once your project is ready, add it to the repository. How to do that is also given on bitbucket. Then once you have committed your Xcode project to repository, add that repository to XCode. How to do that is very nicely explained in XCode guide. Just read that.

Upvotes: 2

DrummerB
DrummerB

Reputation: 40211

SVN requires you to use a server to host your repository on. If you're working on an open source project there are webservices that will allow you to host your repository for free (Google Code for instance). Although it's possible to have the server on the local machine, it's better to use GIT in that case. When you create a new project XCode will propose to setup a GIT repository for you, or see this on how to create a new repository for your existing project.

Upvotes: 0

Michael Dautermann
Michael Dautermann

Reputation: 89549

Setting up one's own Subversion or Git server is something developers shouldn't have to fight with, it can be a pain (in terms of sys administration).

If it were me, I'd consider using GitHub if you want to share code publicly (free!) or if you want to share code privately among several of your own computers.

If you're sharing among your own computers, a "micro" account on GitHub runs $7 per month. This is the option I do for my own private & personal projects. So nice to have support built into Xcode.

There are also other third party providers that do both Subversion and Git, such as WebFaction, but this would also cost dollars as well. All of these services have to recoup the costs of doing your system administration. But I think having somebody else do it for you is well worth not having to deal with the hassle.

Upvotes: 0

Related Questions