More or less. These lines in the .h declare the existence of two public variables called window and controller:
@property (strong, nonatomic) UIWindow window;
@property (strong, nonatomic) ViewController controller;
But these lines only declare the existence of the variables, they don't actually create them. It's up to the class to implement these however it wants - they could be virtual variables for example, that don't actually exist but call methods that create data programmatically, or load it from a database or something.
These lines in the .m file actually create ("synthesize") the variables.
@synthesize window = _window;
@synthesize viewController = _viewController;
What these lines actually say is that the internal variable name is _window, but the public name of the variable is window. That means that within the class you can access the variable directly by saying
_window = something;
But externally you have to access it using
appDelegate.window = something;
Because that's it's public name. You can also access it internally to the class using self.window.
Another interesting fact of Objective-C is that using dot syntax to access variables in this way is really just a handy way of calling setter and getter methods to access them. SO the synthesize line, in addition to creating a variable called _window, is also defining the following two methods:
- (void)setWindow:(UIWindow *)window; // to set the _window variable
- (UIWindow *)window; // to get the _window variable
And you can call these methods directly if you like, using
[self setWindow:someValue];
UIWindow *window = [self window];