开发者

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

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜