In @implementation:
Take step 1
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification{
[_window setReleasedWhenClosed:NO];
}
where _windowis your window that will open in the future
Take step 2
- (BOOL)applicationShouldHandleReopen:(NSApplication *)sender hasVisibleWindows:(BOOL)flag{
[_window setIsVisible:YES];
return YES;
}
where _windowis your closed window