I find out the problem, it has nothing to do with the declaration in AppDelegate.h
The problem is that MyThing matches UIApplicationDelegate, and the UIApplicationDelegate protocol declares a property
@property (nonatomic, retain) UIWindow *window NS_AVAILABLE_IOS(5_0);
So we have to do any of these
MyThing.h (e.g. AppDelegate.h)
@interface MyThing : NSObject <UIApplicationDelegate> @property (nonatomic, strong) UIWindow *window; @end
OR
MyThing.m (synthesizes a window property declared in the protocol)
@implementation WYNAppDelegate @synthesize window; @end
source share