Can't resolve class '...' in interface declaration

I have an interface declared in a .h file in a project that is working fine in Xcode, and also building successfully from Run->Build in AppCode 1.0.3. However, in the editor, I am seeing an error indicating that it can't resolve the superclass in an interface declaration.

Here's the interface declaration (class names changed to protect client anonymity):


#import <UIKit/UIKit.h>
#import "BaseController.h" // BaseController is declared in this header


@interface MyController : BaseController <UITableViewDataSource, UITableViewDelegate> // error is on this line


// properties omitted
// methods omitted


@end



The BaseController superclass is highlighted in red, and when I hover over it I see the error message "Can't resolve class 'BaseController'". The suggested fix is to "Create the new class 'BaseController'", but this class already exists and is declared in the BaseController.h file which is imported as shown in the code above. Note also that the import line is not highlighted in red, so it is finding the header file.


Here's what the BaseController.h file looks like:


#import <UIKit/UIKit.h>


@interface BaseController : UIViewController <UIActionSheetDelegate, UINavigationControllerDelegate, UIImagePickerControllerDelegate>



// methods omitted


@end


I am seeing the same error in many (perhaps all, haven't checked yet) subclass declarations throughout the project.

If I do the suggested fix and then delete the newly created .h/.m files, the errors disappear, but I don't feel I should have to do this in order to make the project work error-free.


Any ideas what's up here?


Thanks,


Greg
1 comment

Hi Greg, sorry for the delay with the answer.
Is your problem re-creatable? Could you create a sample project with this problem and attach it here?

0

Please sign in to leave a comment.