Write string to file in documents folder
Copy this code and paste it in your HTML
NSString *myString;
//Assuume the string you want to write is this NSArray *paths
= NSSearchPathForDirectoriesInDomains
(NSDocumentDirectory, NSUserDomainMask,
YES);
NSString *documentsDirectory
= [paths objectAtIndex
:0];
NSString *path
= [documentsDirectory stringByAppendingPathComponent
:@"myfile.txt"];
[myString writeToFile:path atomically:YES];
Report this snippet
Comments
Subscribe to comments