开发者

Can I add the CAArchive class to my iPhone project to serialize data? If so, how?

I have to use the CAArchiver class for the serialization of the data coming from the .bin file in my iPhone project (I need to use it in a C++ code snippet). How do I do this?

I have also researched the following link: http://msdn.microsoft.com/en-us/library/caz3z开发者_运维技巧y5s(v=vs.80).aspx. This appears to be used in .NET technology.

What am I supposed to do?


CArchive (as per your link) is part of the Microsoft Foundation Class Library. It's very unlikely that you will find an implementation for them on the iOS platform.

If you need only to provide a kind of serialization, Jigneshs answer is the way to go. If you need to be compatible to other output from CArchive then chances are that you will have to implement this by yourself.


I do not know what you want:

but there is a class in iphone

NSData *data = [NSKeyedArchiver archivedDataWithRootObject:dictionary];

Where dictionary can be NSObject

NSObject *dictionary = [NSKeyedUnarchiver unarchiveObjectWithData:data];

Where data is a binary i.e. NSData

Using this, I think it will be helpful what you were looking for....

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜