How to handle Print event (via shortkey CMD + P) in Cocoa with Objective-C?

I tried this in AppDelegate. But after shortkey CMD + P the method never being called. – (void)handleEvent:(NSAppleEventDescriptor *)event withReplyEvent:(NSAppleEventDescriptor *)replyEvent { NSLog(@”111111111″); } [[NSAppleEventManager sharedAppleEventManager] setEventHandler:self andSelector:@selector(handleEvent:withReplyEvent:) forEventClass:kCoreEventClass andEventID:kAEPrintDocuments];

Details