• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Defaults not sync'ing?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Defaults not sync'ing?


  • Subject: Defaults not sync'ing?
  • From: Joachim <email@hidden>
  • Date: Wed, 28 Dec 2005 20:54:24 -0800

I have a system prefs pane which writes its settings to the defaults database using the code below. It then notifies another process about the change, but when that process reads the dictionary, it is the previous, cached, version that is being read.

NSUserDefaults *defs = [NSUserDefaults standardUserDefaults];
NSDictionary *prefs = [[NSDictionary alloc] initWithObjectsAndKeys:
Object-1, @"Key-1",
...
Object-n, @"Key-n",
nil];
[defs removePersistentDomainForName:bundleId];
[defs setPersistentDomain:prefs forName:bundleId];
[defs synchronize];

I've checked that the values are written correctly to the plist file and that the sequence of events is correct. What am I doing wrong?

I'm on Tiger, Xcode 2.2.

Thanks in advance,
Joachim
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden
  • Follow-Ups:
    • Re: Defaults not sync'ing?
      • From: email@hidden
    • Spotlight
      • From: Jeff McNeil <email@hidden>
  • Prev by Date: Document-based app
  • Next by Date: Spotlight
  • Previous by thread: Re: Document-based app
  • Next by thread: Spotlight
  • Index(es):
    • Date
    • Thread