I've written an application that interacts with the Address Book database, and as such needs to read the Address Book preferences. I've been doing this manually, but recently discovered the NSUserDefaults methods "addSuite" and "removeSuite" which allow me to use shared preference files.
I'll try that, but I'm sure it will make things a bit easier for reading the prefs.
Now I want to actually modify one of the preference settings. I figure I can get my application to execute a shell script command along the lines of:
defaults write <suite> <key> <value>
(which certainly does the job), but I'd like to use a nicer Cocoa way of doing this rather than invoking a unix shell.
Does anyone know how I should go about writing preferences to another applications preferences suite using Cocoa/Objective-C?