Thanks, I'll roll my own encoding, then. I should get much less overhead during normal operation then anyway - which could matter in my application.
Eiko Am 22.05.2010 um 01:41 schrieb Kyle Sluder: > On Fri, May 21, 2010 at 4:35 PM, Eiko Bleicher <bleic...@k4it.de> wrote: >> When transferring data between Mac and iPhone/iPad, serializing via >> NSKeysedArchiver seems simple and easy. Wrapping up some "trivial" Objects >> like NSData, NSDictionary, NSNumber, NSString seems to work. >> >> But the question is: is it considered safe to transfer data like that? How >> likely is this scenario going to fail? I imagine how a simple binary change >> makes everything crash; but given that there might be tons of Applications >> that store data in a similar fashion, this probably is just not going to >> happen. > > This isn't really a safe thing to do. If you want to archive simple > stuff like strings, arrays, and dictionaries, use > NSPropertyListSerialization. Otherwise, write a custom serialization > scheme. Archiving (keyed or not) is very fragile, if for no other > reason than it relies on the existence of classes at unarchive time > that existed at archive time. > >> So I would need to worry about changes on one platform that generates >> compatibilty problems on the other. Have there ever been issues with that? > > Not to my knowledge, but I don't see any versioning mechanism so it's > quite possible there might be in the future. > >> It wouldn't be a big deal if I needed to package my data on my own, but this >> also opens room for bugs.... > > Better to do the right thing in this case. > > --Kyle Sluder _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com