I have an iOS app built since the beginning with an error in it. Since the source was began constructed from the template, its appdelegate.h looks like:
@interfa
They can't go there. You can put them inside the curly braces {} like this:
@interface myAppDelegate : NSObject {
UIWindow *window;
myViewController *viewController;
BOOL myBool; // intended to be globally accessible
NSString *myString; // intended to be globally accessible
}
@end
And that makes them global to the implementation class. But if you want them global to every class in your app then you should drop them in your App-Prefix.pch file:
//
// Prefix header for all source files of the ... project
//
#import
BOOL myBool; // intended to be globally accessible
NSString *myString; // intended to be globally accessible
#ifndef __IPHONE_3_0