is it possible to convert a cpp model object to NSData

179 views Asked by At

I am trying to pass a model object to a local server that i created. The model object is a cpp class. I need to convert it into data so that i could write it over the stream. When i tried to archive the class using Coder methods, gave me an error.

Is there any better ways to do this? Any help or insight on this, is appreciated.

Thank you...

1

There are 1 answers

2
StilesCrisis On

Did you try +dataWithBytes:length:?