Reputation: 223
I accidentally had one of my files selected in a project in Xcode and pushed delete and it was deleted. Anyone know how to recover it? It won't let me undo. Please help.
Upvotes: 10
Views: 27817
Reputation: 12178
There are some files that XCode deletes utterly without warning. These files are permanently deleted unless you have a backup.
Upvotes: 0
Reputation: 7822
The following steps will allow you to recover (a) deleted file(s):
Upvotes: 4
Reputation: 139
The file itself is not deleted, it is simply removed from the Project Navigator. To add it back, go to File -> Add files to "projectName" and select the missing file, after having navigated to the project's folder if needed. Or simply hit cmd+z
Upvotes: 10
Reputation: 1159
May be its too late but for someone else it might be good to know, that's why I am answering it.
NOTE: If you have removed files directly to trash then restore from trash and repeat second step to add reference back in project.
Upvotes: 8
Reputation: 1349
This file should be in the trash folder, look in that folder or you can search via apple spotlight.
Upvotes: 6