I have a property in AppDelegate that I would like to grab easily. So far it’s not working for me as planned:
[(AppDelegate *)[UIApplication sharedApplication] wasLoggedIn] = YES
AppDelegate.h
@property (nonatomic, assign) BOOL wasLoggedIn;
AppDelegate.m
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
wasLoggedIn = false;
}
What am I doing wrong?
Should be
You’re calling the method on the UIApplication instance at the moment.