I had this problem when upgrading from Swift 2.2 to Swift 3.0, specifically for Cocoapod Realm Swift. I think this solution should work for this common problem. Here's what worked for me:
(1) Go to the derived data folder / Users / (yourUserName) / Library / Developer / Xcode / DerivedData p>
(2) Select a project with an error
(3) Remove
(4) Clean Project
(5) Run
Housekeeping initially did not work for me. Hope this helps!
source share