I'm encoding some NSDictionary with NSCoder and I want to save it somehow inside the app. Could anyone please tell me how I could do it?
I want to give the user the ability to see what he's done previously when he opens the app.
I'm encoding some NSDictionary with NSCoder and I want to save it somehow inside the app. Could anyone please tell me how I could do it?
I want to give the user the ability to see what he's done previously when he opens the app.
You can write it to a file in your Application Support folder or, if it's small, you can put it into NSUserDefaults
. For either of those, though, if the dictionary contains only property list types, you can write the dictionary directly. You don't have to encode it to an NSData
first.