cocoa - How to prevent logout from app running as agent -


the sample menu bar app agent lsuielement true. want prevent logout on conditions.

i tried - (nsapplicationterminatereply)applicationshouldterminate:(nsapplication *)sender. never receive message when user logs out.

but without , able prevent logout well.

need alternative solution prevent logout.

do not use lsuielement in plist. instead on launch use:

[nsapp setactivationpolicy:nsapplicationactivationpolicyaccessory]; 

i verified applicationshouldterminate: in fact called when done way.


Comments

Popular posts from this blog

java - Intellij Synchronizing output directories .. -

git - Initial Commit: "fatal: could not create leading directories of ..." -