I have created a repo. on bitbucket. Now I want to connect that repo to the Xcode 9.So I can directly push, pull and do all the git stuff from Xcode.
is there any way to do that?
thanks!!!
If the project folder is already on your computer, and is already under git control, skip this first step. Otherwise, use the command line, or Xcode's Source Control > Clone dialog, to clone your bitbucket repo onto your computer.
Open the project in Xcode and work with it.
There is no step 3! Xcode will see that this repo is under git control and you'll be able to use Xcode's built-in source control features as usual.
I just spent an hour cajoling Xcode 9.2 into using a new Bitbucket git repo as a new remote. I had trouble adding a new remote using the Bitbucket SSH URL since Xcode assumed my user name is "git" and did not allow me to edit it. Here are some tips in hopes it saves you some time and aggravation. This assumes you are already using Xcode's source control and have made commits locally on your Mac. Make sure your commits are up to date before going through this procedure.
Create a new empty git repo on Bitbucket. Do not create a readme at this point, as this would make your new repo not... empty.
Use the HTTPS address to access your Bitbucket repo from Xcode. Problem is, for an empty repo, Bitbucket does not make it easy to figure out what this address is. For me, it was the same URL Bitbucket shows for SSH access but replacing "git#bitbucket.org:" with "https://user#bitbucket.org/", with user#bitbucket.org (hopefully obviously) YOUR username.
In Xcode, open the Source Control Navigator. This is the second icon from the left in Xcode's left panel next to the folder icon, it looks like a square with an x and a circle in the middle. Right click "Remotes" and select "Add Existing Remote...". Under "Remote Name" enter "origin" or "Bitbucket" or whatever floats your boat and under location enter the https:// URL from step 2.
Now, hooray, in Xcode you can do Source Control->Push successfully.
Thank goodness Apple does all my thinking for me, it saves me from hurting my little brain. Now my only brain trauma is from banging my head against the wall dealing with this kind of nonsense.
You can actually add real Github* account to your Xcode under Xcode/Preferences/Accounts.
This will actually do authentication when you checkout Bitbucket project after that. I guess that they joined user databases.
I had exactly the same problem as You had. To solve it I created a project with a git version control within Xcode 9 and then someone asked me to share it. To do it I created an empty repo on bitbucket, copied its address and then went in terminal to my project's directory.
cd ~/repos/<repo_name>
Once there you just have to write
git push --mirror *copiedRepoAddress
Make sure that the repository you created at bitbucket is EMPTY and that you have commited all changes on your local repo.
Just follow below steps your project will be added automatically to bitbucket.
1.Go to Source Controller ---> create git repository
once click on create option.
2.Open your Bitbucket account and create new repository.And choose i have an existing project.
3.Select your repository address.
Please help us setting up xcode in order to use with our svn repository.
We have our svn repository on local server 192.168.1.xx IP and we check out via http (http://192.168.1.xx/svn/xproject), I have mac mini which was upgraded with Yosemite. Ever since upgradation, Xcode (6.1.1) is not allowing to commit or update but only checkout is possible. Other options are in faded mode.
We used to have xcode 4.2 which worked fine. Please suggest what is step-by-step procedure to fix this problem and xcode for commit and update.
Are we missing any depending components to use xcode?
Have you tried to setup remote source control path? Like,
Goto Menu > Source Control > YOUR_REPO -- BRANCH > Configure YOUR_REPO (select this).
From this, you will get 3 tabbed window, 2nd one is for Report svn configuration. Please setup you svn repo path here.
May this help you.
I'm having a problem with my Xcode
I set my svn settings in the account settings seems to connect just fine
then I want go to the project I want to commit to the server when I click on source control the only clickable thing is checkout. I tried this like 20 times. It just creates a map with the name of the SVN server that's it.
Does anyone have an idea what I'm doing wrong here?
It seems like you are just creating the appropriate folder for it but not putting your project in it.
Try this. do the checkout again like you already did before, then locate the project you want to sync with your SVN, place it into the folder that was created when you used the "Checkout" function. Now open your project again from within this folder. You should be able to commit/push/pull etc. your project now.
Hope this helps.
I have little experience using VSS before. For iOS development, I have installed Subversion on a remote Windows machine and accessing it from my Mac. And I have a few gray areas to clear up.
This is one of the tutorials I followed. But its written based
on an older version of XCode. The SCM tab in XCode preferences is
not in XCode 4.6. Is it completely removed or moved somewhere else?
The main reason to choose Subversion over Git was the ability to
lock files in Subversion. I know you can do it through the Terminal.
Is there a way to do it through XCode itself?
Say I checkout an XCode project to my local mac. And locked a
certain file. An another co-worker also checkout the same project to
edit that same file I locked. I read that the other person can also
edit that file but he cannot commit it back since it is locked. Is there a way to
notify the other people that a certain file is locked at the time of
checking out?
In the repository, I have created the standard tags, branches and
trunk folders. The project should be in trunk folder, right?
From the menu bar, choose Window > Organizer. Then in the Organizer window, choose the Repositories tab. The + button at the bottom left lets you add a new repository.
No.
You could try setting the svn:needs-lock property, I suppose, but you won't be able to do that from Xcode.
Yes.
It seems that all of the initial Google results for "using subversion with xcode" are actually just tutorials for installing and configuring svn and Xcode, as opposed to actually using the two (i.e. interacting with svn via Xcode's GUI).
Is anyone aware of a good guide that teaches the tricks and pitfalls of working with svn via Xcode's GUI? Something that bridges the gap between the most excellent Version Control with Subversion book and the Xcode IDE (as in pure Xcode GUI without any terminal command use)?
Edit:
We all love our terminal commands, and we all love Eclipse but (and I mean this in the nicest possible way) neither is really the point of the question. I’d prefer to use svn via Xcode’s IDE instead of via terminal just as I prefer (well, for this case) to code in Xcode’s IDE instead of using vim and gcc. Apple engineers spent a good bit of time implementing that SCM menu in Xcode; someone has to have seen a usage guide somewhere.
I used this page as a reference for setting up my XCode projects with SVN. It is a good starting point, but I'll give a short walkthrough of what I did (since the page isn't really all that helpful!).
A couple notes: I'm using XCode 3.1.2 and Subversion 1.4.2. I've heard of problems with using SVN 1.5, but there are ways around that which I wont get into.
First off, I had a repository already set up and created the XCode project afterwards.
In XCode you need to set it up to know about your repository using the SCM tab in the preferences window. Enter:
A Name (this is arbitrary and used for reference with XCode)
The scheme (http or svn)
The host (i.e. svn.example.com)
The path (the exact path to the SVN repository located on the host)
The port (only if it isn't the default)
And a username and password used to access the repository.
The URL will be auto-filled as you enter the other fields. Hit "OK" when all the fields are good and XCode says it can connect.
Then open your project and do a "Get Info" (Round blue icon with an exclamation mark) on the project itself. Under the "General" tab down at the bottom is an option for SCM, select the repository you made in 1 and close the window.
Now open SCM in the menu-bar and go to "Repositories." Hopefully you've built your repository right using branches, trunk, and other directories at the base level because XCode doesn't have support for checking out the root directory. So go one directory at a time down the list and click the "Checkout" button and select a directory to check it out to (I recommend a "Code" or "Source" or "SVN" directory inside your XCode project directory). You cannot checkout multiple directories at once, but you can tell the next directory to checkout before the first has finished and XCode with queue the commands.
Once that is all done go back to your XCode project window and "Add -> Existing Files..." to your project. Select the directory you've checked out the repository to and I recommend using the "Create folder references" option instead of the "Recursively create groups" option because added and removed items will be automatically reflected in a Folder Reference but not in a Group.
Now you've imported your SVN repository into an XCode project. From here any time you make a change, simply Right-Click (Control-Click if you only have 1 button) in the file and at the bottom of the context menu are the SCM options for comparing, committing, updating, and discarding (reverting) the file. You can also use the SCM menu in the menubar for file or project-wide updates/commits/reverts.
I second the comment by the_mandrill, SVN support from within XCode is very limited, especially if you're used to Eclipse.
I also don't understand why everyone seems to need visual clients. I keep a terminal window open on my project directory and I have no problems interacting with SVN from the command line.
I know this is not quite what you asked, but I wouldn't rely much on the use of SVN from Xcode as what you can do with it is very limited. It's useful for being able to do a diff or annotate direct from the IDE but not a great deal else. I don't think it's any substitute for using a separate standalone client such as SmartSVN or Versions.
You also have to jump through a number of hoops to get Xcode to work with SVN version 1.5 onwards, so that's something to be aware of before installing a standalone client. If in doubt, check out a sandbox first.
Here is one of the best tutorials to configure subversion in XCode - http://iphonedevelopment.blogspot.com/2009/03/version-control-is-your-friend.html
It also teaches even to create repository in local MAC.
if you want to work with svn through a gui interface then i suggest you use eclipse + subclipse plugin (which have more features and much more reliable and easy than svn on xcode)..
you will work in xcode as normal but you will use eclipse only as an svn client (by creating a general project in eclipse and make it points to your xcode project directory )
and here is a tutorial of how to install subclipse
A lot of people have problems using the build in svn client, especially to get a new project into svn and that it works.
I created a straight foreward tutorial on how to do this, along with a very well known pitfall (works for Xcode up till the latest version of xcode incl. Iphone 4 sdk)
http://www.sodeso.nl/?p=599
I myself looked up for some good resources and one of the best I've found is a quite recent video from the WWDC 2012 :
Sign in here if it's not already the case : https://developer.apple.com/videos/wwdc/2012/
Then there is a video called :Session 411 - Source Control Management in Xcode
It explains how to use version control both with GIT and Subversion. It's really nice !
Hope it helps!
As has been mentioned in many other answers, the svn client with Xcode is quite weak (and that is being kind).
Personally, I think that running Eclipse just to get access to a svn client is a bit heavy handed.
I would suggest two answers:
Use a dedicated svn client for the Mac (Versions and Cornerstone are both very good, albeit not free... there are free ones, such as svnX)
If you are not wildly comfortable with the terminal, you can script a couple of the key commands that you want to use and add them to your Xcode user scripts folder, then you can trigger them from a menu item of from a keystroke, just as if you were using the Xcode native client. There's a ton of examples on how to do this available via Google.
I came across these - no idea how well they work, but wanted to add some resources if I could:
http://www.macresearch.org/tutorial-introducing-xcode-30-organizer
http://developer.apple.com/tools/subversionxcode.html
With XCode4 you can perform almost all of your SCM tasks from within the IDE itself, this is a great step forward.
Here is a link to the official guide :
http://developer.apple.com/library/mac/#documentation/ToolsLanguages/Conceptual/Xcode4UserGuide/SCM/SCM.html#//apple_ref/doc/uid/TP40010215-CH7-SW26
Unfortunately you still have to use the Terminal command line to add a new project to SCM, this is also clearly documented in the link above.
What it does not tell you is that you also need to manually add ignore instructions to your SCM configuration otherwise you are going to end up with user settings and build outputs in your repositories. I am currently figuring out the list and I will update this answer once I have it finalised.
PS :
I know this question is quite old now but I have added this for those of you who arrive here looking for answers like I did.
PPS :
Terminal command line increases probability of human error, takes longer, is more complex and is less transparent to end users. Overall the omission of being able to add projects to SCM from within XCode is poor design, I expected better from Apple who are usually good at simplifying UI. For the command line fans out there you might feel L337 but try managing a team of programmers and being responsible for their code, command line is not your friend.