Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6535505
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T10:22:53+00:00 2026-05-25T10:22:53+00:00

I need to write an app that will run in the background or as

  • 0

I need to write an app that will run in the background or as a System Process on the Mac. It needs to run at start up and needs to run even while no user is logged in.

I’ve got Xcode 3.2.6 (Using Xcode 4 is not an option for me here) – what type of project should I use for it? When I’m ready to deploy it, how do I “install” it so that it’ll auto-start when the computer boots up?

EDIT

My biggest question is what type of project to use. I need a process that will stay running and that will monitor a server and send it updated information every few minutes.

I initially created a command line tool for this. The main thread runs and immediately exists, so I have it in an infinite loop which sleeps the thread and performs any processing required by means of an NSTimer. Is this the wrong approach? Is there a better? That’s what I’m after.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T10:22:54+00:00Added an answer on May 25, 2026 at 10:22 am

    What you’re describing is called a Daemon on Mac. You want to read the Daemons and Services Programming Guide for instructions on how to build them.

    The most common form is a Launch Daemon that runs under launchd, described in the Launch Daemons and Agents docs. These are appropriate for Mac OS X 10.4 and later.

    Prior to 10.4, there were “Startup Items.” Do not use these unless you need to run on pre-10.4 systems.

    Technical Note TN2083 (Daemons and Agents) is another document worth reading.

    EDIT

    Yes, the command-line template is the best starting point.

    Most Daemons should be “on demand.” That means they should let launchd run them when “something interesting” happens, they then should continue to run to handle additional events, and finally they should let launchd kill them when no events have come in for a while. What “interesting events” look like depends on your problem. Common events are traffic on a socket, changes to a file, or files existing in a queue directory. Launchd can handle auto-running you in any of those cases.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to write a Sinatra app that will run on a shared Passenger
I need to write an app that reads a config file with info on
I need to write an app that retrieves data on expiring SSL certs. What
I need to write a small console app (patch) that turns off the print
I need to write an app with a GUI interface that works on Windows
I am trying to write a simple Ruby program that I will run from
I need to write a simple app that runs two threads: - thread 1:
I'm trying to write a pom.xml that will allow me to run a command
I am trying to write a basic app that will read data off a
I am have an app I am writing that will need to download alot

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.