I was developing a big app and in the final release I accidentally deleted my app target and all the code is gone now. Do anyone knows how to retrieve it?
Asked
Active
Viewed 7,636 times
4
-
1your only hope is backups. you were doing them, weren't you? – KevinDTimm Oct 24 '12 at 20:59
-
I don't think so. Back ups like our normal saving in a different place? – Gravity M Oct 24 '12 at 21:24
-
If the answer, "go back to a prior commit in git (or mercurial)" is impossible for you, then the answer is: start using source control (like git). – Dan Rosenstark Oct 24 '12 at 21:42
2 Answers
1
1 You choose "Add Target method (in the bottom of this screen):
2 Next choose "Single View application.
3 In next view in "product name" enter the same name as your projext name, and in "project" choose your actual project:
After that you will be supposed to build and run the project

edzio27
- 4,126
- 7
- 33
- 48
-
-
@G-Man this is not a nightmare. The nightmare is when you've spent 1.5 years coding a project and this happens. This is tuition. – Dan Rosenstark Oct 24 '12 at 22:06
-
IF you have your files on Dropbox they have a rewind function that restores a folder to an earlier time. VERY useful, saved me this time. – Thyselius May 22 '23 at 20:09
1
If restoring from a backup or a repository is not an option, and your bundle has many resources, I'd recommend starting a new XCode project from scratch and importing the source files and resources into it.
- Create a new Xcode project of the same type and info as your project.
- Delete this new project's ViewController and AppDelegate source files, copy your source files into the new project's folder, then import them into the Xcode project.
- Add any frameworks you've used.
- Import the resources (images, sounds, plists, etc) into the project.
It might take longer than recreating a target and adding things to it, but you're less likely to make mistakes along the way, and you'll ensure that everything is properly added to the target.

Pradip
- 1,507
- 11
- 28