How to access SVN repository in XCode 4.2? - iphone

Now, i switched to developing from Xcode 4.2. In Xcode 3.2.5 i have used SVN repository to save my project details. But, in XCode 4.2 i dont know how to access SVN Repository? Can you please tell me what are the steps i need to follow to access SVN from XCode 4.2? Thanks in advance.

Windows > Organizer > Repositories > Add Repositories (bottom left +) > Type - Subversion

In XCode 4.4, I had some problems viewing repos that were setup in XCode 4.2. One of the great features of XCode is it's ability to connect to repo and show whether a file has been modified by showing an "M" next to the class file that hasn't been committed yet. When I added a new repo as I had before (the GameBit method), all of my projects stopped showing the "M" or "A" and all the commit messages weren't visible in the Organizer, and my trunk/branches/tags folder were disconnected (red dot).
When this happens, the first thing you should do is close the project and quit XCode. That should reset the svn configs of all your projects.
If that doesn't work, open Terminal and enter this command to checkout your new working copy:
svn co (http or https)://YOURsvnSERVERurl/PROJECTNAME(name of your new project folder you just added to Organizer)
That immediately resulted in all previous projects in the Organizer > Repositories to show the commit messages again and linked everything up as it was before. However, the new project still didn't show the "M" and "A" until I quit XCode and rebooted.
This answer is meant for anyone who tries to add a project under svn to XCode's source control management system and XCode is not showing the commit status.

Related

Red arrow icon in subclipse

My computer set-up:
-eclipse with aptana studio 3 plugin, plugin development tools and subclipse
and i have 2 projects under version control. i managed to copy the files from one project to the second since i don't know how to merge two projects yet. when i tried to copy the js folder from one project to the other, this happens:
notice the red arrow. now, i thought it was nothing. i committed the project and left for work. when i went to the office and updated my copy of the project, i found out that the js folder was not there. when i checked the repository, the js folder was not there at all. i was sure it was there when i left home.
found this link which is a thread that gives an heads-up on subversion icons but this red outward pointing icon isnt there in the list.
what do they mean?
Using Eclipse Mars.1 Release (4.5.1) and SVN 1.8.10. My icons reverted back to normal after running Team > Cleanup.
The arrow indicates switched
http://www.eclipse.org/subversive/documentation/teamSupport/svn_label_decor.php
I see there is already a solution in the comments above, just thought id share my solution which seemed easier , simply
Right click on project > Team > Disconnect (from repository)
Right click on project > Team > Re-connect (to repository)
Problem solved!
NOTE: After re-connecting had to commit all changes in project, seemed scary at first but simply updated version number. (I am always a little nervous when synchronizing with the repo)
NOTE: Using subversion SVN plugin in eclipse

SVN Switch with relocate in Eclipse

My question can be claimed to be an extension/similar to the question posted here.
basically, I need to do the same functionality using Eclipse plugin Subclipse. Subclipse has a functionality to "Switch branch/tag/revision", however, this is limited as it treats the new url as a repository and tries to compare them. I only wish to change the URL.
any ideas!
From SVN Repository Exploring perspective right click on your project repository and choose Relocate.. from contextual menu:
It will bring up a confirmation windows showing you active projects which will be affected by relocation.
In more recent versions of Eclipse/Subversive (which don't have the Relocate option) you can simply click Location Properties instead and change the URL. It will warn you that "The attached projects will be relocated because the repository root URL differs from the previously entered one." This is what you want!
I had the similar issue on Eclipse Luna 4.4.2 64 bit version. Initially I've relocated the project on the command line and Eclipse failed to recognize the relocation change. Alternatively I've tried to delete and re-import the projects, but sadly this approach failed to work out as well. Then sorted it out this way;
Closed all the projects,
Opened the SVN Repository Exploring perspective,
Right clicked on the repository >> Location properties,
In the properties pane, I've changed the url and in the below I choose "Use the repository URL as the label" clicked on finish,
Switched back to the Java perspective and reopened the projects.
After this alteration Eclipse stopped giving such errors and I was able to see the new root address of each project on the right side of the name
I found that if the projects that are related with the SVN you are trying to relocate are open in Eclipse, the operation fails with the following error in the 'SVN Console':
switch --relocate http://old.scm.com/svn/APP http://new.scm.com/svn/APP .../webapp
svn: E155019: Cannot relocate '...\webapp' as it is not the root of a working copy
svn: E155019: Cannot relocate '...\webapp' as it is not the root of a working copy
The solution was to close all the projects (Project Explorer -> right click on the project -> Close Project) and only after that, do the URL relocation in the SVN window (SVN Repositories window -> right click on the URL of the old SVN -> Relocate).
Notice that that the box 'Projects that will be relocated:' on the following screen is empty. Before it showed all the open projects in Eclipse IDE.
This was they only way I got it to succeed.
Using Eclipse Kepler Service Release 2, with Subclipse 1.10.10.

linking gdata to an xcode 4 project

I'm having major issues linking gdata to a project after upgrading from xcode 3.2.5 to xcode 4. I would like to know if anyone is having similar issues, and what did they do to resolve them. i am using gdata version 1.11 which is the latest on their site. The project works flawlessly on 3.2.5, thanks.
I have created a workspace for my project, and then added the gdata.proj to it. So I do have all the files linked by reference. But project files which include #import "GDataYouTube.h" do not see the file. I get "No Such File or Directory"
Good News... resolved and tested, all working follow these steps...
Open your project in xcode 4 from 3.2
click File -> Save As Workspace
in project navigator on the left, collapse your Project if you see all the files
below your collapsed project, in the empty space right click or control click -> Add Files to...
select the project file you wish to link to, leave Copy items unchecked, click Add
Now you will see 2 collapsed projects in your Project navigator, expand both
Now what I didn't know I had to still do
Drag the files or folders you want from the second project to your main, make sure your Main project target is selected in the options, and I also have group selected then click Finish
You are good to go, you might have some warnings about your second project and its targeted SDK. Fix those by clicking the project name in the Project Navigator -> Build Settings -> Base SDK to 10.6, Deployment Target to 10.5

How to open an existing GitHub project with Xcode?

I am new to xcode and I want to learn iphone development.
I found one demo project on github, I want to know how to open this existing project?
Download the project via git / or zip
Open folder
Double click on .xcodeproj file
if on the top left, you see a something like "Base sdk missing"
Double click on the first item in the three
Go to tag build
Select a sdk for the Base SDK
Close the opened popup
Click on build an run
If you have error, you should see a red icon on the right bottom
Note: since June 2016, you can open your demo GitHub project in Xcode directly from the GitHub site!
But you will need the latest Xcode 9, announced at the 2017 WWDC
See "Clone in Xcode"
It's easy to explore code in your browser when you visit a GitHub repository, but you often want to pull that code directly into the appropriate editor and try it out.
For example, if the repository contains an .xcodeproj or .xcworkspace file, you might want to open that code in Xcode.
This is possible starting today with the new "Open in Xcode" button.
That will trigger the git clone for you.
Note: as illustrated in "Unable to see “Open in Xcode” button on GitHub", you also have to be logged in to GitHub in Xcode as well.
In Xcode, navigate to Preferences.../Accounts, select GitHub and enter your login credentials.
Using xed ./ios in the terminal of the root of the app worked for me.

How to change subversion settings in xcode?

I've had subversion running in Xcode for a while. The integration of subversion has always hung by a thread. However my subversion server has changed its ip address ... and my xcode project still tries to look up the source on the old ip.
I have changed the ip of the subversion server via the SCM menu in xcode ... however these changes don't seem to effect the project.
Anyone got any idea how I change the subversion ip in the project?
Cheers
Rich
I've run into a similar issue when relocating a Subversion repository would be completely ignored by XCode.
Here's a list of steps I've taken in order to force Xcode to update the repository path in my project:
Open up Terminal and go to your XCode project directory:
$ cd /path/to/your/project
Switch the Subversion working copy to the new URL (in the example below I also changed the SVN protocol but this is irrelevant):
$ svn switch --relocate svn://old_path svn+ssh://new_path
Fire up XCode, close your project's window and open up Organizer (⇧⌘2)
Go to the Projects tab, locate your project in the list on the left, right-click it and click Remove from Organizer...
Close XCode and open up your .xcodeproj XCode project file again.
You should now see an updated SVN path under the Location heading under Source Control in the File inspector (the Utilities panel).
If you go to Organizer, you should also see the project back in its place under the Projects tab and a new item under the Repositories tab.
The environment I've tested this solution in: Mac OS X Mountain Lion + XCode 4.4.1
You need to use the --relocate option for the svn switch command if you are just changing hostnames or ip addresses.
So, something like this:
svn sw --relocate svn://brian#123.123.123.123/mypath svn://brian#122.122.122.122/mypath
It's not Xcode, it's svn itself that still looks to the old reposotory. Try firing up a terminal, and cd'ing into the project directory. There use the switch svn command:
svn switch NewURL
then refresh or close/open the Xcode project.
Try creating a new SCM repository and setting your project to the new one, and if that works, you can safely delete the old one.
I had similar problems when the dns name for my svn server changed (but keeping the same IP)
svn sw --relocate worked for me (from terminal on a mac). After the change, go to "Refresh entire project" from the SCM menu in xcode.
Good idea to do an svn info first though to check your repo URL. On my first attempt I entered the wrong FROM URL and the svn sw --relocate just does nothing, with no error reported.
The confusing thing in xcode was the the SCM - repositories browser worked fine after I updated the svn settings in xcode preferences, but my project was not fixed until after the --relocate business.