开发者

How can I know how my app was launched on Mac OS?

开发者 https://www.devze.com 2023-03-19 23:54 出处:网络
I\'ve got a problem, and have been looking for a solution for a longtime. I made a application which has an option which will launch the app automatically when the system starts using Launch Services

I've got a problem, and have been looking for a solution for a long time.

I made a application which has an option which will launch the app automatically when the system starts using Launch Services.

If application is launched by the user (ie. opening the .app) I want to do something.

If application is launch by Launch Services when the system starts I want to do another thing.

So I need to know how the app was launched: by the System (Launch Services loading 开发者_JAVA百科the app when the computer turns on) or User (User opening the .app in the Finder).

How can I get this information? Any suggestions are weclome.

prethanks.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号