Running app with no user logged in?

I have an app that I’d like to leave running on Mac OS X but not have any user logged in. When I log out it shuts it down. Is there some way to do this?

If you want your app to run independent of any users being logged-in then you want to create an OS X Launch Daemon. For Xojo that means building a ConsoleApplication. To automate launching, visit https://developer.apple.com/library/Mac/documentation/MacOSX/Conceptual/BPSystemStartup/Chapters/CreatingLaunchdJobs.html and build yourself the appropriate Property List file. Here’s a very basic one:

[code]<?xml version="1.0" encoding="UTF-8"?>

Label com.MyBusinessName.MyAppName Program /Library/Application Support/MyAppName/MyAppName KeepAlive [/code] Getting your app and Property List file in the right places and setting the right permissions are a bit tricky so you may want to let the OS X Installer handle it. To do so, you'll need to create a Product Archive which you can read about at https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man1/productbuild.1.html.

It’s not a simple process or an easy effort but you can build, install and configure an app that runs in the background on OS X without any users logged-in.

I believe you need to call the Daemonize method (and your app must be command-line.)

If the app is launched and daemonized under a user account, the app will quit when the user logs out.

Thanks for the information. That’s what I’ll do.