I'm not sure if I got something wrong but from the examples I could find. I wrote that little helloworld.
#import <Foundation/Foundation.h>
#import <Foundation/NSUserNotification.h>
int main (int argc, const char * argv[])
{
NSUserNotification *userNotification = [[NSUserNotification alloc] init];
userNotification.title = @"Some title";
userNotification.informativeText = @"Some text";
[[NSUserNotificationCenter defaultUserNotificationCenter] deliverNotification:userNotification];
return 0;
}
I compile it with:
cc -framework Foundation -o app main.m
It compiles and I can execute it but it won't show anything. For some reasons, nothing gets presented. I read that Notifications may not get displayed if the application is the main actor. How can I make it show Notification?