• 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: NSCoding between iOS and Mac OS X
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSCoding between iOS and Mac OS X


  • Subject: Re: NSCoding between iOS and Mac OS X
  • From: Ricky Sharp <email@hidden>
  • Date: Wed, 25 Aug 2010 10:29:36 -0500

A similar question came up recently.

While some objects (e.g. NSNumber) things should be binary compatible. But you may run into issues.

Also depends upon what objects you are coding. Mac OS X uses NSColor whereas iOS uses UIColor.

I would recommend using an intermediate normalized format instead. Then write independent code for each platform.

If archiving colors, capture normalized values like color mode (ARGB, HSL), color components, etc. Then, rebuild up objects as needed.

For text data, I would use UTF-8 with the original text being normalized.

Sent from my iPhone

On Aug 25, 2010, at 8:43 AM, Nathan Day <email@hidden> wrote:

> Does anybody know whether NSCoding can be used to transfer data between iOS and Mac OS X. Is this documented as guaranteed to work. I have tried to do a google search but I got nothing, probably searching for the wrong thing.
>
> Nathan Day
> http://homepage.mac.com/nathan_day/
>
> _______________________________________________
>
> 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
_______________________________________________

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

  • Follow-Ups:
    • Re: NSCoding between iOS and Mac OS X
      • From: Nathan Day <email@hidden>
References: 
 >NSCoding between iOS and Mac OS X (From: Nathan Day <email@hidden>)

  • Prev by Date: Re: Is this possible....
  • Next by Date: Re: UIViewController and splash screen orientation issue on iPad
  • Previous by thread: NSCoding between iOS and Mac OS X
  • Next by thread: Re: NSCoding between iOS and Mac OS X
  • Index(es):
    • Date
    • Thread