0

I'm working with a project that requires me to serialize my objects in order to send them... Apple says that because space is limited I should serialize the objects without using NSCoding or NSCoder because there is no way of predicting the end size of my data.

What is the best approach to serializing my Object without NSCoder so that it is as small as possible?

Matt Zera
  • 465
  • 3
  • 12
  • The normal coding protocols are fine for most projects. I suggest using the standard coding protocol, and then, if you have problems, ask how to solve specific problems. I am sure you will have enough issues solving the problems in your app, without inventing problems. – Jody Hagins Apr 19 '14 at 20:08

1 Answers1

0

First, you need to define the requirements of your application. Then you need to clarify which data needs to be sent. Then you need to create and specify a data format. Then you need to define a network protocol. Then you need to implement this network protocol. And each of these steps is intrinsically non-trivial.

These are the general steps for this kind of problems. I did this many times in the past. I fear there is no easier way to do this. However, maybe you find a network protocol, a data format, or a library that already deals with the kind of data that you are trying to transfer. Without details of your particular application, however, its impossible to give a more detailed answer!

Hope this helps...

Michael
  • 6,451
  • 5
  • 31
  • 53