We have the facility to receive all notifications sent by the cocoa framework to our application which are one or the other way associated with our application. Below is the code snippet to receive and view these notifications. Although it is not advised to receive all these notifications but just in case if you need to do so….
#import <Cocoa/Cocoa.h> @interface MyClass : NSObject { } @end @implementation MyClass - (id) init { if (self = [super init]) { [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onNotification:) name:nil object:nil]; } return self; } -(void)onNotification:(NSNotification*)notification { NSLog(@"Notification name is %@ sent by %@",[notification name], [[notification object] description] ); }