Skip to content
This repository has been archived by the owner on Jan 2, 2025. It is now read-only.

Login Items / Open at Login #129

Open
marcolz opened this issue Jun 6, 2014 · 1 comment
Open

Login Items / Open at Login #129

marcolz opened this issue Jun 6, 2014 · 1 comment

Comments

@marcolz
Copy link

marcolz commented Jun 6, 2014

Hello - Is there a way to configure MacGap apps to open (automatically) at login?

@rawcreative
Copy link
Member

Yes, there are two ways to do it, depending on whether your app is sandboxed (app store) or not, but both require adding some Obj-c code to your project.

If you're planning on submitting to the app store, or your app is otherwise sandboxed, you have to create a separate 'helper' app and include that in your project. The helper app simply needs to open your main app and then quit, and the app needs to be bundled inside the main app. Here's an article that goes into detail and provides some sample code: http://blog.timschroeder.net/2012/07/03/the-launch-at-login-sandbox-project/

If your app is not going to be sandboxed or be on the app store, than you can use Launch services and the LSSharedFileList. Here's a SO post that has a few code snippets/approaches you could use:http://stackoverflow.com/questions/815063/how-do-you-make-your-app-open-at-login

Unfortunately this is not something that can be added to MacGap simply because the latter method will prevent app store acceptance and the first method requires specific knowledge of the project and secondary app creation.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants