How to save conversation history in instance messager?
I'm constructing an internal instance messager app which is very simil开发者_JS百科ar to whatapps. Can someone give me suggestions of how to save the conversation in the local device. Is it ok to archiver the whole UIViewController to save all the messages?
Thanks so much.
You have a number of choice , like you could store in sqllite database , As object using NSUserDefaults and as file in your application sandbox.
And file could be either xml
or simple txt
format.
Updated:
How to store custom objects in NSUserDefaults
No you need to save history either into NSUserDefaults or save into Sqlite Database.
精彩评论