How does one remove files from a Xcode Project? I’m having troubles by pressing “Delete” and then selecting “Remove References”.
I ask because I moved a bunch of PNGs from <root> to <root>/icons/ (after creating the icons subdirectory). I removed the PNGs from the project, and then re-added the PNGs under the new location. I also added an “icons” folder under “Resources” in Xcode. It results in CopyPNG failures due to the old path.
Some testing revealed that Xcode does not remove the references in the PBXPROJ file. Which begs the question, what exactly am I removing from the project if a reference remains? It also begs, how do I truly expunge the data from the project so I can cleanly add it again?
Jeff
Here are my thoughts..
1. Right-click the file –> Delete –> RemoveReference
It will remove only the linked reference from your project.The files will not be deleted. They will exist in the project folder. When you require the file again , just browse the files from the project folder and add to your project. Note that "Copy items into the destination group’s folder" option should be unchecked.
2. Right-click the file –> Delete –> Move To Trash
It will remove all the files and linked reference from your project. When you require the file again , you have to browse the files from its downloaded/original location and add to your project.Note that "Copy items into the destination group’s folder" option should be checked.