PDA

View Full Version : How can i start my application whenever MAC Machine started?




newformac
May 24, 2011, 11:46 PM
Hi all,

please help me how can i start my application whenever MAC Machine started?

thanks in advance.



LeeTom
May 24, 2011, 11:56 PM
right-click (or hold control and click) on the application in the dock, select options, and choose "open at login".

newformac
May 25, 2011, 03:02 AM
how can set this programmatically?

jiminaus
May 25, 2011, 03:14 AM
There are multiple ways depending on your need. Generally the System Startup Programming Topics (http://developer.apple.com/library/mac/#documentation/MacOSX/Conceptual/BPSystemStartup/BPSystemStartup.html) guide will tell you how.

Does your application show a user interface, or is it a background daemon?

Do you need it to start whenever Mac OS X starts, or just when there's a user logged in?

What do you want to happen in the face of fast user switching? One instance of your program for all users, or an instance per user logged in.

Which versions of Mac OS X do you need to support?

newformac
May 25, 2011, 03:45 AM
My application have user interface and its running in hide mode.

i just want to start my application whenever mac os machine will started or new user login.

currently my application have an instance per user logged in.

i want maximum version of mac os are supported.

please help me for this.

thanks in advance.

Hansr
May 25, 2011, 04:08 AM
Do you want it on any machine it's run on or just your own?

newformac
May 25, 2011, 04:39 AM
on any machine on which my application running.

Hansr
May 25, 2011, 05:52 AM
If it installs via installer and then runs silently all the time set it to also install a launchagent:

http://developer.apple.com/library/mac/#documentation/MacOSX/Conceptual/BPSystemStartup/Articles/LaunchOnDemandDaemons.html

newformac
May 28, 2011, 06:55 AM
thanks its done now.