NSString *fileName = @"sample.txt";
NSString *path = [NSTemporaryDirectory() stringByAppendingPathComponent:fileName];
NSString *contentsOfFile = @"Sample text.";
NSData *data = [contentsOfFile dataUsingEncoding:NSUTF8StringEncoding];
[data writeToFile:path atomically:YES];
No comments:
Post a Comment