In case anyone has this problem in combination with cocoa pods, these steps helped me to solve this error (after few hours):
- run
pod cache clean
- from SRC_ROOT run
rm -rf Pods
(optionally rm Podfile.lock
)
- Click on the Simulator app, click Simulator -> Reset Content and Settings...
- Go into Xcode, In the Menu bar click Product -> Clean (or click Shift + Command + K).This will to clean your Xcode project.
- Create a new Terminal Shell (From menu bar click Shell -> New Window)
- run
rm -rf ~/Library/Developer/Xcode/DerivedData/
...then try to Build & Run your project.
Note:
SRC_ROOT can be found by entering the Navigator, clicking on the project, clicking on the project again from the project and targets list, going into Build Settings, scrolling all the way to the bottom to the User-Defined Section, and the SRC_ROOT will be labeled as PODS_ROOT. Take that and copy it verbatum into the Terminal and proceed with step 2 from the list above.
Hope it helps.