• 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: Compatibility of Data iPhone / Mac
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Compatibility of Data iPhone / Mac


  • Subject: Re: Compatibility of Data iPhone / Mac
  • From: Bleicher Eiko <email@hidden>
  • Date: Sat, 22 May 2010 15:31:48 +0200

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 <email@hidden> 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 (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: 
 >Compatibility of Data iPhone / Mac (From: Eiko Bleicher <email@hidden>)
 >Re: Compatibility of Data iPhone / Mac (From: Kyle Sluder <email@hidden>)

  • Prev by Date: getting file time stamp from a NTFS volume
  • Next by Date: getting file creation date from NTFS
  • Previous by thread: Re: Compatibility of Data iPhone / Mac
  • Next by thread: Re: Getting TextEdit to Recognise UTF-8 Output [solved]
  • Index(es):
    • Date
    • Thread