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:

  1. regular launch user (via selecting app finder, launchpad, etc.)
  2. launch @ login (automatic launch myhelperapp on startup)
  3. 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

Popular posts from this blog

Fail to load namespace Spring Security http://www.springframework.org/security/tags -

sql - MySQL query optimization using coalesce -

unity3d - Unity local avoidance in user created world -