Re: NSCoding between iOS and Mac OS X

2010-08-28 Thread Ken Ferry
On Thu, Aug 26, 2010 at 6:05 AM, Nathan Day nathan_...@mac.com wrote:

 What about binary property lists, they should be interchangeable between
 iOS and Mac OS X?


Yes, a property list, binary or not, is definitely interchangeable.

The keyed archive container format is interchangeable, however whether a
particular archive is interchangeable depends on what's in it.  Obviously if
a class is only present on one of iOS and Mac OS X, that's a problem.  For
arbitrary individual classes present on both OSes, it's difficult to say
anything too concretely.  People may have taken advantage of the new OS to
drop some aspects of compatibility.

If your keyed archive contains exclusively Foundation classes, it's our
intent that they should be as interchangeable between iOS and Mac OS X as
between versions of Mac OS X.  I don't think we have specific tests to make
sure it works, though, so, well, if it doesn't for something, file a bug.

-Ken
Cocoa Frameworks



 On 26/08/2010, at 1:29 AM, Ricky Sharp wrote:

  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 nathan_...@mac.com 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 (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/rsharp%40mac.com
 
  This email sent to rsh...@mac.com

 Nathan Day
 http://homepage.mac.com/nathan_day/

 ___

 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/kenferry%40gmail.com

 This email sent to kenfe...@gmail.com

___

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


Re: NSCoding between iOS and Mac OS X

2010-08-26 Thread Nathan Day
What about binary property lists, they should be interchangeable between iOS 
and Mac OS X?

On 26/08/2010, at 1:29 AM, Ricky Sharp wrote:

 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 nathan_...@mac.com 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 (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/rsharp%40mac.com
 
 This email sent to rsh...@mac.com

Nathan Day
http://homepage.mac.com/nathan_day/

___

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


NSCoding between iOS and Mac OS X

2010-08-25 Thread Nathan Day
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 (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


Re: NSCoding between iOS and Mac OS X

2010-08-25 Thread Ricky Sharp
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 nathan_...@mac.com 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 (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/rsharp%40mac.com
 
 This email sent to rsh...@mac.com
___

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