I’ve been trying to figure out how to make a copy of an original Xcode project in order to update an app I made. Reason I wish to do this is to make sure that I don’t ruin my code while updating it and to make sure that I have the original code as a backup incase anything goes wrong. Is there a more efficient way to do this other than creating a new project and copying/pasting everything into that new project?
What I’ve tried:
- Playing around with Source Control, making master copies and whatnot, don’t think anything happened
Editing General Target Settings[Apple Developer Centre] Read all the content in here and I think Copying Files While Building a Product might be what I’m looking but I’m not too sure what it does
Thanks for reading
You mean you made a Finder copy of the project folder?
You should really look into Gits, at least locally on your machine, or snapshots. They really are the best way to handle bold new risky mods to an existing good project.
I agree with @marciokoko on using git.
A couple of options you could try.
Duplicate the project (right click the project folder > duplicate), and create a new branch in Git (if it is under git source control).
Duplicate the project folder and copy down a rename script like this one on my github (sktemplate-swift/renameProject.sh at master · spritekitbook/sktemplate-swift · GitHub) to rename the project to something else.
All things considered though, if it is an app you are currently supporting for your users Git is the way to go. Make a new branch for each update, and you can even make a branch for experimenting with some new crazy idea without damaging your production code. Once you get a handle on what you can actually do with it, you’ll never want to be without it.
I am very new to Xcode so I need to backup projects I select the icon name.xcodeproj and Click on File then Duplicate. I then rename copied file and work with it. Hope this helps.
I agree with @jgnovak and @marciokoko. Git is the only way to go if you are doing any real app development. I even use it for my “experimental” code.
If you don’t know much about Git, then I’d recommend the free book “Pro Git” by Scott Chacon. It is released under creative commons, so it’s free to download (https://git-scm.com/book/en/v2), and at over 500 pages it is quite thorough.
As @jgnovak says, “Once you get a handle on what you can actually do with it, you’ll never want to be without it.”
With that I couldn’t agree more. Git makes you development life so much easier.
THere are two good youtube videos on this.
First is to duplicate project.
second is to rename project
My interest is that I want several apps with the same code but different names , different backgrounds and different data.