Deleting derived data in XCode8 safely

I would like to try to completely clear derived data (I have problems with code signing, and I want to try this).


I did an option-clean, but that does not seem to delete derived data.


I found a way to access derived data :

- Project settings

- clicking on the arrow following derived data leadfs to thr common folder, which contains several files

- so I clicked on Advanced…

Then, under legacy, there are 2 paths for Products and Intermediates

Clicking on the arrow at the end leads to DerivedData/A_Program_name/Build/ Intermediates or Products


My questions :

what should I delete ?

- the full folder DerivedData/A_Program_name ? With folders : Build, Index, info.plist, Logs, scm.plist, TestIndex

the Build forlder DerivedData/A_Program_name/Build

- only DerivedData/A_Program_name/Build/ Intermediates or DerivedData/A_Program_name/Build/ Products

- or just some elements in these folders ?


Is there a risk deleting those files ?


Is it worth deleting derivedData for this code signing problem ?

Accepted Reply

This thread has been deleted

>I have found 15 files (.png) that each cause the failure !


Good job - glad you found the issue(s).


>I used to put bthe files (.png) in a resources forlder in the project and then copy into xcassets.


I would just drag/add them to the assets catalog to avoid duplicates. See Asset Catalog Format Reference: Adding Asset Catalogs to Projects


Check Build Settings/Copy Bundle Resources to confirm they aren't being double added to the build each time the binary is built.


Sorry I couldn't help more.


Ken

Replies

You can delete everything up to and including the immediate subfolder of DerivedData that belongs to your project. (But, make sure you close the project in Xcode first.)


It does no harm to try this. You'll just cause the project to be re-indexed the next time you open it, and fully rebuilt the next time you build it.


I very much doubt that it will solve code signing problems, though.

>s it worth deleting derivedData for this code signing problem ?


I would be surprised if it did, but you haven't described your exact code signing issue(s), so...


Open Keychain Access and confirm no expired and/or duplicate certificates. Delete any you find, restart your computer and try Xcode again.


Confirm your signing processes here: https://developer.apple.com/library/content/qa/qa1814/_index.html