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?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
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:
A tutorial on NSUserDefault
NSUserDefault Class Reference
2/ NSCoder: you will encode your data and save it to hard disk then you can initWithCoder to get data back. Look at here:
A good article to begin with
NSCoder Class Reference
Archive and Serialization
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.
There is a FILE IO part here