My AppDelegate class has quite a few methods. In my attempt to organize these methods I’m trying to group some of these methods in a category.
So now I have these files:
- AppDelegate.h
- AppDelegate.m
- AppDelegate+GameCenter.h
- AppDelegate+GameCenter.m
My category is ofcourse defined like this:
@interface AppDelegate (GameCenter)
// methods
@end
When I compile I get this error: ‘Cannot find interface declaration for ‘AppDelegate’.
I think that means I have to import a file somewhere. But what file do I have to import and where? My first thought was to import AppDelegate+GameCenter.h in AppDelegate.m. But that doesn’t work. Any tips? What is the best way to handle this?
Sounds like this error is coming from a missing
in the header of “AppDelegate+GameCenter.h”. Add that, and, of course, stick with
in the header of
AppDelegate.m, as you’ve done.