I want to save an objects state permanently (as in serialization) and retrieve it according to the user need in an objective c project. In simple words, I want to serialize/deserialize an object. Please tell me the best way to achieve this in objective c iPhone project. I will be really thankful to you if u provide me a sample code or any tutorial.
Asked
Active
Viewed 2,612 times
-1
-
Do some search on SO before posting Check the links ..... http://stackoverflow.com/questions/5637787/archive-serialize-objective-c-object-with-c-instance-variables http://stackoverflow.com/questions/2182115/make-a-custom-class-serializable-in-objective-c-iphone – Jhaliya - Praveen Sharma Jun 20 '11 at 06:00
2 Answers
1
You could save the objects in core data.
Here you have an tutorial.
And Core Data Programming Guide from Apple dev.
If you have less complicated object and relation you could save them as NSSDictionaryes in NSUserDefaults. Here is an small tutorial.

Alex Terente
- 12,006
- 5
- 51
- 71
1
Use pList for serilization in objective C.
go through this link:- Archives and Serializations Programming Guide

Jay
- 856
- 7
- 17