Reputation: 673
My problem is that the NSApplicationWillTerminateNotification
is not called when I quit my application. What I have tried: (appDelegate.m)
- (void) applicationDidFinishLaunching:(NSNotification *)aNotification{
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(applicationWillTerminate:) name:NSApplicationWillTerminateNotification object:nil];
}
- (void)applicationWillTerminate:(NSNotification *)aNotification{
NSLog(@"quit");
}
OR
- (void)applicationWillTerminate:(NSApplication *)application{
NSLog(@"Quit");
}
My application has no window, as it is a background application -> I deleted the window and the menu in interface Builder.
Upvotes: 0
Views: 439