How to create a helper application for Mac App to start it on user login?

前端 未结 4 1098
遥遥无期
遥遥无期 2020-12-24 09:17

In fact, I read the following document:

Applications can contain a helper application as a full application bundle, stored inside the main application bundle in the

4条回答
  •  醉梦人生
    2020-12-24 09:46

    I found a handy link:

    http://www.delitestudio.com/2011/10/25/start-dockless-apps-at-login-with-app-sandbox-enabled/

    EDIT: sadly this link no longer works. Perhaps someone could suggest a better alternative...

    It's a good tutorial for doing registering a Login Item in a Sandboxed environment if that's of use (and we'll all need to eventually!). The important thing is that, annoyingly, you have to copy your built, main app to the Applications folder and don't do what I do which is forget to sandbox the helper-app and add a Application is agent (UIElement) row to the helper's plist with TRUE for the value. NSLog and Console is your old-fashioned debugging friend now.

    ...just have to figure out how to get the helper app to launch the main app when they're both sandboxed..... Edit: Found this question: Cocoa: Sandbox entitlement to launch another application

提交回复
热议问题