Xcode will not remove Derived Files

I need to find out why Xcode suddenly and without provocation starts to give me this error and does not allow me to build my project. When I say “without provocation”, I mean that I edit the text in the database, the application delivers the text and checks my progress in the simulator, doing nothing in Xcode except cleaning, building and testing. Everything will be fine for several test sequences, and then suddenly, without changing anything in my procedures, the application will not build, and I get these errors:

error: delete / Users / Casey -Casey / Library / Developer / Xcode / DerivedData / PEM-LTE-2016-gyoajgqmkkoluhgbrhjmgwakiejl / Build / Products / Debug-iphonesimulator / Living Eucharist.app/images: The directory is not empty.

error: failed to delete "/ Users / Casey-Casey / Library / Developer / Xcode / DerivedData / PEM-LTE-2016-gyoajgqmkkoluhgbrhjmgwakiejl / Build / Products / Debug-iphonesimulator / Living after the failed Eucharist.app/images command: the directory is not empty

I went to this Derived Data folder and physically deleted the contents, only for Xcode to restore this content when the application was reopened, the assembly failed, and then I would repeat the same errors again. My only solution so far is to completely remove Xcode and the developer folder, reinstall Xcode, after which it behaves a bit, but ultimately does the same thing again. Today I did it 3 times.

If anyone has any suggestions, please help me solve this problem so that I can export and complete this project.

Thanks.

Additional information in the answers:

I have:
1: Closed the project.
2: Opened the projects folder and deleted Derived Data, seeing that the Projects folder is empty (empty) with the image “No projects” in the window.
3: Make sure the trash is empty. 4: Launch "WatchDog", an application designed specifically to solve problems with derived data in Xcode.
5: Closed Xcode and reopened.
6: Open the project, clean and run the "Build" command.

After that, the same errors appear again.

+6
source share
4 answers

This is normal for deleting the DerivedData folder, you can directly delete all files from the DerivedData (Not DerivedData Folder) subfolder.

This should have no effect. The contents of the DerivedData folder are created at build time, and you can delete them if you want. It's not a problem.

All DerivedData content will be recreated when you re-create projects.

I suggest you clean the project and build the project again, ALSO NEED TO MAKE SURE YOU DELETE the DerivedData folder is not in the BIN , please clear the trash, it’s important

+5
source

Check the "Copy Bundle resources" at the build stage, you should find several files (there should be images in your situation) in this list twice. Remove them and rebuild.

+13
source

In Xcode, go to Window> Projects, select your project, and the delete button will delete the derived data.

+1
source

This is not the best option, but it helps me many times - create a new project and drag all the source files from the current to the new one.

0
source

All Articles