Mulan
Mulan

Reputation: 135406

How to create basic osx prefPane?

Long time reader, first time participant on StackOverflow :)

disclaimer I am very new to the mac development world.

I am trying to create a prefPane for a small daemon that has already been created.

I would like the prefPane to do two things:

  1. Show the current status of the daemon ("started" or "stopped")
  2. Provide a button to start/stop the daemon.

Can I use Interface Builder to make the interface and somehow have the prefPane use it? (Dumb question?)

Thanks for any tip/pointers on how/where to get started!

ps: I couldn't find a prefpane tag. If someone can tag this more appropriately I won't be offended :)

Upvotes: 3

Views: 1155

Answers (1)

Staros
Staros

Reputation: 3282

Making a prefPane isn't all too difficult. Just follow the examples here. And yes, you can use interface builder to make the interface.

Working with Launch Daemons is a much more difficult task. Check out this thread for starters. You can also create a NSTask wrapper around the "launchctl" command, with the verbs list, load and unload.

Upvotes: 2

Related Questions