Well, to create a file, just use
[[NSFileManager defaultManager] createFileAtPath:@"Your/Path" contents:nil attributes:nil];
This creates an empty file, which you can write to or read from. To write text (or XML), just use NSString
's writeToFile:atomically:encoding:error:
method like this
NSString *str = //Your text or XML
[str writeToFile:"Your/Path" atomically:YES encoding:NSUTF8StringEncoding error:nil];
To read from a file, just make an NSString
with the contents of that file
NSString *contents = [NSString stringWithContentsOfFile:@"Your/Path"];
or, if it does not contain a string, get an NSData
object from the file
NSData *contents = [NSData dataWithContentsOfFile:@"Your/Path"];