I got ios app. I need to store some data. I tried to do it in txt file like this:
[toFile writeToFile:path atomically:YES encoding:NSUTF8StringEncoding error:NULL];
But when i dissmis view controller, where i save data, file’s content is null again. Why?
I bet you’re trying to write to your app’s bundle. You can’t. You have to write in either NSDocumentsDirectory or [app sandbox]/Library.