Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I remove a file reference in Xcode?

Tags:

xcode

This is an odd one. I added a file to a project, thought I didn't need it so deleted, then realized I did indeed need it. When deleting I was prompted for whether to move to trash or just remove references, I chose remove reference. Now I can't add that file back in because I'm told there's already a file there by that name. What's going on here? There is no file by that name in the project listing. Is there some other place I need to go to remove something?

like image 279
CodeBuddy Avatar asked Apr 23 '26 16:04

CodeBuddy


1 Answers

If you only removed the reference to the file, then it is still located in the project folder and you can't add a new file with the same name. So you should go to the folder where your project is located, and delete the file. (Right click on the project and select Show in Finder)

like image 180
sch Avatar answered Apr 26 '26 12:04

sch



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!