• 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
Re: Delete NSDefaults while running
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Delete NSDefaults while running


  • Subject: Re: Delete NSDefaults while running
  • From: Jens Alfke <email@hidden>
  • Date: Sat, 19 Apr 2008 08:30:58 -0700


On 19 Apr '08, at 8:04 AM, Kevin Grant wrote:

[[[NSUserDefaults alloc] init] removePersistentDomainForName:@"com.yourdomain.yourapp"];

I think that should work. To be safe, call
[[NSUserDefaults standardUserDefaults] synchronize];
first; otherwise if there are any unsaved changes to the defaults, they might get written out after the file gets deleted, thereby re- creating it.


—Jens

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Delete NSDefaults while running (From: Andrew James <email@hidden>)
 >Re: Delete NSDefaults while running (From: Kevin Grant <email@hidden>)

  • Prev by Date: Re: Implementing a Slightly Unusual NSTableView
  • Next by Date: horizontal sizeToFit of NSTextView or NSTextField
  • Previous by thread: Re: Delete NSDefaults while running
  • Next by thread: horizontal sizeToFit of NSTextView or NSTextField
  • Index(es):
    • Date
    • Thread