Hello;
I am using the Reachability code from Apple in my project. My project is under SCM using Subversion.
I tried dragging in a new version of the Reachability code in to Xcode, but it won't copy in to my project. I want to update my version in my project from 1.5 to version 2.0.
What is the best way to do this? Do I have to checkout the file using the command line tool via Terminal and then commit the new version from the command line? I figure if I do this, then Xcode will indicate a "U" next to the file name and I can update my project's working directory that way. But that seems like a pain using the Terminal.
Any ideas are appreciated.
Thanks.
I always use the terminal to manage Subversion and I don't feel it is a hassle.
You should be able to drag the reachability files into xCode but make sure you tell it to Copy the original files. However, I think it is better to copy the files to your project folder on the fileystem and import references to your classes in xCode. This keeps both xCode and the SCM happy.
I always use the terminal to manage Subversion and I don't feel it is a hassle.
You should be able to drag the reachability files into xCode but make sure you tell it to Copy the original files. However, I think it is better to copy the files to your project folder on the fileystem and import references to your classes in xCode. This keeps both xCode and the SCM happy.
I understand, thanks. But I already have the two Reachability files (.h, .m), v1.5, in my Xcode project already and wish to update them to the new v2.04 versions. When I drag the new version in to Xcode, it doesn't copy the new files in to my project - the copy fails.
Do I have to delete them first - which will delete them out of the SVN repository - then drag the new files in? Seems like there should be an easier way. No? Am I missing something here?
Personally, I would just close XCode, replace the files from within Finder or the command line, and open XCode to check the files into SVN.
I'm a noob with XCode and SVN. I close Xcode; replace the two files in the working directory with the new ones, then open XCode and check in the files? I thought it wasn't a good idea to mess with the directories directly; always letting XCode handle it.
I guess I need a bit of hand-holding with this one. I understand the concept that you always work in a working directory with SVN and XCode compares the date/times (or something) to see if it's been modified from the one in the repository. You can then update the one in the repository with the one that XCode has in it's file system.
I'm hung up on the actual procedure for replacing two files that are under SVN control and managed by XCode. Use the terminal commands? Some detail would help here; having a brain drain with this.
Thanks.
XCode is actually not tracking the files at all, it just passes on the information it gets from SVN. The only reason I recommend closing XCode is that XCode might have the file loaded into memory, which could overwrite your changes.
And SVN does not care if you changed the files from inside XCode or not. All it knows is that the files are changed, and stores the changes when you check them in. So you can change them anyway you like. You can drag and drop from finder, copy them from terminal, or even change them from the text editor if you like.
ETA: One warning, though. Make sure you only overwrite files. If you overwrite the entire directory, you might erase the hidden files SVN relies on.
Last edited by JasonR; 09-03-2010 at 01:13 PM.
Reason: Add directory warning.
Understood.
I went in to another project that was under SVN control and did a test run. I created a dummy file; then outside of XCode, I created a new version of the dummy file with some modifications. I closed XCode; then just overwrote the dummy file in the working directory with the modified dummy file.
I then started XCode; it reported that the file is different than what's in the repository by putting an "M" next to it on the left. I opened the file; saw that it was my newly modified one and then committed my changes to the repository. So it worked.
I'll do the same procedure with the other files that I need to update.
Thanks for your help. Had a brain drain on this one for some reason.
Cheers!