title: How can I share NSUserDefaults between two applications in OS X
body: <p>I'm writing an application that will be submitted to the Mac App Store.  As part of the application there is a helper/background application.  My main application needs to be able to write persistent settings to NSUserDefaults.  My helper application, which is presumably running in the background, needs to be notified of those changes and then be able to read the new NSUserDefaults so that it can configure itself appropriately.</p>
  
  <p>The notification portion of it I'm not too worried about.  I see that NSUserDefaults has a notification named NSUserDefaultsDidChangeNotification that is sent when persistent defaults are changed.  If that doesn't work there are always distributed notifications that I can use.</p>
  
  <p>What I can't seem to figure out is how to make the defaults from the main application become accessible to the background/helper application.  I've fiddled around with the following methods of NSUserDefaults but I'm not getting anywhere.</p>
  
  <pre><code> - (void)addSuiteNamed:(NSString *)suiteName
   - (void)setPersistentDomain:(NSDictionary *)domain forName:(NSString *)domainName
  </code></pre>
  
  <p>Could somebody please show me code for both the main application and the background/helper application that works?  Thanks in advance.</p>