skip to Main Content

Problem:
I have an Xcode project but a TableViewController file has been deleted and cant be restored even with git checkout commands. It simply shows as a red line in the Xcode File path even when checking out. (The path of that file points to .Trash which was emptied.)

Now, I have the compiled and still working app on my physical device. Is there any way to retrieve the code from that device or even my mac itself and recover the viewcontroller?

Hope you guys can help.

2

Answers


  1. Chosen as BEST ANSWER

    Thanks for your answers. I just redid all my work. Taught me I’ll never going to have a git repo without a remote anymore..


  2. It is not possible to get the file from the device.

    An easier solution would be to add a new TableViewController file to your project, go to your repository on github.com, navigate to the TableViewController file and copy the code into the new local file. Make sure to verify that all your outlets are connected properly to avoid an unexpected crash.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search