• 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: registerDefaults error and NSCoding protocol
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: registerDefaults error and NSCoding protocol


  • Subject: Re: registerDefaults error and NSCoding protocol
  • From: Bill Bumgarner <email@hidden>
  • Date: Thu, 27 Nov 2008 12:25:46 -0800

From the documentation:

...
A default’s value must be a property list, that is, an instance of (or for collections a combination of instances of): NSData,NSString, NSNumber, NSDate, NSArray, or NSDictionary. If you want to store any other type of object, you should typically archive it to create an instance of NSData. For more details, see User Defaults Programming Topics for Cocoa.
...


So, no, ensuring that a class conforms to <NSCoding> will not make instances of said class compatible with NSUserDefaults.

b.bum

_______________________________________________

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: 
 >registerDefaults error and NSCoding protocol (From: John Clayton <email@hidden>)

  • Prev by Date: registerDefaults error and NSCoding protocol
  • Next by Date: Garbage collection leak in simple Core Data application
  • Previous by thread: registerDefaults error and NSCoding protocol
  • Next by thread: Garbage collection leak in simple Core Data application
  • Index(es):
    • Date
    • Thread