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

c++ - How to add Crypto++ library to Qt project -

jQuery Mobile app not scrolling in Firefox -

How to use vim as editor in Matlab GUI -