XCode keeps automatically importing old dependencies
I'm working on an iPhone application in XCode 4.1 and decided to rebuild the entire thing from scratch. I've deleted the old project directory and all of its contents, created a new project with the same name in the same directory, and have since been working on it for like 15 hours straight without any issues.
My problem is that I went to go and create a new UIViewController subclass with the same name as one of my old view controller subclasses (deleted along with the rest of the old project) and now when I go to run the application, I get the good old "your view controller is not key-value coding compliant for this property, etc.." Well I'm lost because all of my source files that I've been working on all day have the same names as their predecessors and I haven't had any issues with any of them. The new view controller in question doesn't even use a nib; I'm writing the UI manually.
The only thing I can think of is that XCode is somehow associating my new source file with the old source file (the older one had a nib associated with it) and since my new one doesn't use a nib, it is naturally not going to have its properties linked up to one.
I've tried cleaning and building, restarting my computer, restarting xcode, deleting my Library/Preferences, even changing the project directory and nothing has worked. Is there any way I can fix this? It's an incredibly frustrating error and I can't figure out what's causing it
EDIT: Ok, I fixed it. I took George's suggestion and开发者_StackOverflow社区 deleted the project files under ~/Library/Developer/XCode/DerivedData, cleaned my project, and then removed the executable from the simulator and let XCode reinstall it. It seems to be working properly now
Look under ~/Library/Developer/Xcode/DerivedData/ and delete old project there.
精彩评论