osx - How do I know the way my OS X application was launched? -
ok. 2015. lot of things have changed. , ask...
does know way detect how application launched on osx ?
because still don't have answer...
i talking these cases important me:
- regular launch user (via selecting app finder, launchpad, etc.)
- launch @ login (automatic launch myhelperapp on startup)
- launch user selecting item in services menu ("do in myapp") assuming app wasn't launched before.
right detecting launch-at-login outdated getcurrentprocess
function, obtaining current process id , looking parent process info. in case parent process info obtained (!) , bundleid not equal list of strings (myhelperapp bundleid, com.apple.loginwindow, com.apple.coreservices.uiagent) (!) - not launch-at-login case.
yes, works now, c'mon people, outdated, not stable way solve problem!
and important - there seems no way tell app launched via services menu!
has found new on topic?
Comments
Post a Comment