I had a similar error a while ago, because Xcode can use a precompiled version of the application.
Here's how I solved it:
In xCode, make sure your application does not work in the simulator (click the stop button), then Build menu > Clean target
or SHIFT-CMD-K
.
Also, clear the contents in the Derived Data ~/Library/Developer/Xcode/DerivedData/
.
Hope this works for you.
source share