The sample menu bar app is a agent as its LSUIElement is TRUE. I want to prevent logout on certain conditions.
I tried with - (NSApplicationTerminateReply)applicationShouldTerminate:(NSApplication *)sender. But I never receive this message when user logs out.
But without , I am able to prevent logout as well.
Need an alternative solution so as to prevent logout.
Do not use LSUIElement in the plist. Instead on launch use:
I verified that applicationShouldTerminate: is in fact called when done this way.