• 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: Property List Format vs NSKeyedArchiver Format
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Property List Format vs NSKeyedArchiver Format


  • Subject: Re: Property List Format vs NSKeyedArchiver Format
  • From: Tony Parker <email@hidden>
  • Date: Tue, 13 Oct 2009 14:02:07 -0700

Hi Bridger,

On Oct 13, 2009, at 1:08 PM, Bridger Maxwell wrote:

Hey,
For a cross-platform game, I need to make a game file format that would be
readable and writeable on a few different platforms. The game is simply a
serialized object graph. I am looking at the XML format used by
NSKeyedArchiver, and perhaps implementing it in the other languages.
Alternatively, I can make my own subclasses of NSCoder.


I would like to read more on the NSKeyedArchiver XML format, but can't find
documentation on it. Is it open? NSKeyedArchiver has a property
"outputFormat" which can be set to NSPropertyListXMLFormat_v1_0. However, I
thought property lists could only contain certain objects (dictionary,
array, etc.), and didn't handle things like circular references. Is the
property list format and the format used by NSKeyedArchiver the same?


-Bridger Maxwell

Part of the work done by the keyed archiver is indeed to get plist- compatible values for keys in the objects in the graph that is being archived. However, the data output by the keyed archiver is really only designed to be read in by the keyed unarchiver. You would end up reimplementing the archiver logic for your other platforms, and at that point it seems like you might as well have just designed your own format (flat file, property list of your own making, XML, whatever). What the best option is for your game probably depends on the complexity of your object graph, what platforms you are targeting, and other things.


Good luck,
- Tony

_______________________________________________

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: 
 >Property List Format vs NSKeyedArchiver Format (From: Bridger Maxwell <email@hidden>)

  • Prev by Date: Object Alloc Instrument and releasing question
  • Next by Date: Re: Code Sign verification on Leopard
  • Previous by thread: Property List Format vs NSKeyedArchiver Format
  • Next by thread: Re: Property List Format vs NSKeyedArchiver Format
  • Index(es):
    • Date
    • Thread