4

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?

Gravity M
  • 1,485
  • 5
  • 16
  • 28

2 Answers2

1

1 You choose "Add Target method (in the bottom of this screen):

enter image description here

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:

enter image description here

After that you will be supposed to build and run the project

edzio27
  • 4,126
  • 7
  • 33
  • 48
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.

  1. Create a new Xcode project of the same type and info as your project.
  2. 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.
  3. Add any frameworks you've used.
  4. 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