I have Objective-C code that registers for such notifications:
@implementation MyClass - (id)init { self = [super init] [[NSDistributedNotificationCenter defaultCenter] addObserver:self selector:@selector(onNotify:) name:@"com.apple.screensaver.didstart" object:nil]; } - (void)onNotify:(NSNotification *)aNotification {
This works great when compiling into an application, but I don't get any notifications when compiling into dylib, which is then loaded into the application.
Any ideas?
source share