Which classes / frameworks must I look at? I don't want to use 3rd party libs, so just plain old, boring default solutions to read / write text files and stuff like that... Is there something like a File IO framework?
views:
23answers:
2
+1
A:
I only know 2 ways to read/write to the disk in iphone:
1/ NSUserDefaults: really restricted to some data type only. Look at it here:
2/ NSCoder: you will encode your data and save it to hard disk then you can initWithCoder to get data back. Look at here:
Just read again that you want to do a text file, so NSFileHandle is also a good choice for you, you can look at here.
3/ NSFileHandle.
vodkhang
2010-06-02 15:32:25
+1
A:
You don't need a framework. You can just good old fashioned POSIX calls open, read, write, and all their friends work just as you would suspect. If you want to move up a level you can use use NSFileHandle to have a Cocoa level interface that is a bit more Objective-C flavored.
Ukko
2010-06-02 15:43:43