0

I have a web service which is written in DotNet and returns a archived class object which I need to unarchive in a Cocoa app.

Is this possible?

I tried to use the information in How to encode/decode a long long property with NSCoder?, but I don't know the key to decode it, and my attempts caused a crash.

Should I be using NSCoder, or something else?

Community
  • 1
  • 1
Pirate
  • 545
  • 1
  • 6
  • 15

1 Answers1

1

I would serialize and deserialze in a well known interchange format, like YAML, XML(XML::RPC, SOAP) or JSON, I would probably go with JSON. if you are on iOS and able to target only iOS 5.0 and later; then there is a built in class NSJSONSerialization, otherwise you should investigate SBJSON.

Grady Player
  • 14,399
  • 2
  • 48
  • 76
  • Yes Grady For these formats it is possible but I am talking about archiving and unarchiving the class object from DotNet to iOS. And Yes I am targeting iOS 6.0 or above. – Pirate Jun 12 '13 at 13:47
  • Class Object? including methods, ie, you want to be able to save and subsequently run .net code natively on a Mac Or iOS device? – Grady Player Jun 12 '13 at 14:37
  • No I just want to extract data out of it use this data in my objective C class. – Pirate Jun 14 '13 at 09:18
  • if you really mean class, rather than instance of class, then you should serialize that data too, one object for class data, which you will store in objective c land once, and each instance would be a seperate object also. – Grady Player Jun 14 '13 at 11:58