- Home /
Question by
erlemaitre · Jan 16, 2021 at 10:11 AM ·
pluginsnative pluginmacosx
MacOS native plugin - Notification at app launch
Hello,
I'm trying to build a unity native plugin for macOS, and I would like to be notified inside my plugin when my app has finished launching. In my Objective-C++ code, I have the following:
+ (void)load{
NSLog(@"The plugin is loaded!");
[[NSNotificationCenter defaultCenter] addObserver:[self shared] selector:@selector(applicationDidFinishLaunching:) name:NSApplicationDidFinishLaunchingNotification object:nil];
But the notification is never received...
I setup the same code for my iOS app and it's working fine, but on macOS, the notification is not received. Any help would be appreciated!
Comment