How can derived data be deleted from a project on Xcode 8?
I was wondering too. It isn't the same as Xcode 7 (at least not for me) - there is no "Projects" item on the Windows menu, which listed the projects and had a "Delete" button next to Derived Data when you selected a project. I ended up just going to ~/Library/Developer/Xcode/DerivedData and deleting the folder that starts with the Project name.
Yep, the 'Window/Projects' menu choice is missing, so it's all back to manual now.
What is still there is Prefs/Locations>Derived Data, where you can tap on the tiny arrow at the end of the derived data path to open it in the Finder, however. Then you have to figure out which one you want to blast.
I'm saying that an option-clean deletes the folder (all targets), not just the contents (derived data) for the selected target.
When a simple clean/delete derived data seems ineffective, an option-clean build folder will always use the bigger hammer. I never bother with just a clean, especially when building for the store.
I see your point, tho, and wonder why they changed the menus, unless it was to simplify, and/or make room for a new selection..
Add `rm -rf ~/Library/Developer/Xcode/DerivedData` as an alias in your terminal sessions (i.e. .bashrc, .profile, .bash_profile).
This is a bit of a **** & pave but better that unexpected errors on build. You could write something more clever that uses the Xcode target to determine which subdirectory within `DerivedData` to delete.
An easy 'Delete Derived Data' solution is sorely missed by our team. Please bring it back.
The best way to get this feedback to the folks who can effect change is to file a bug about it.
Please post your bug number, just for the record.
Share and Enjoy
Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware
let myEmail = "eskimo" + "1" + "@apple.com"
As a work around, you can make an Automater workflow. Trick I learned on a gig once...
1. Open Automater in /Applications.
2. Create a new service
3. In work flow actions, goto Utilities and drag Run Shell Script to the right panel.
4. Change Service receives selected "text" to "no input"
5. Change "any application" to Other... select Xcode in Finder
6. In the shell script add the command that will delete the derived data. Something like... ( or maybe less dangerous )
rm -rf ~/Library/Developer/Xcode/DerivedData/*
7. Goto the the file menu and choose save. The service will be saved in your ~/Library/services directory.
8. Run Xcode.
9. Select the Xcode menu goto Services. You should see your sevice. eg. DeleteDerivedData
10. Run service. Derived data deleted via Xcode.