I have an nsarray of strings i would like to save as a text file of strings on separate lines.
I am using NSFileManager createFileAtPath, and I need to convert the NSArray into NSData first. I have tried this:
but this doesnt give the desired results.....
here is the code i am using:
where myArray, is simply an array of strings.
I am using NSFileManager createFileAtPath, and I need to convert the NSArray into NSData first. I have tried this:
Code:
NSData *data = [NSArchiver archivedDataWithRootObject:filters];
but this doesnt give the desired results.....
here is the code i am using:
Code:
NSData *data = [NSArchiver archivedDataWithRootObject:myArray];
NSFileManager *fm = [NSFileManager defaultManager];
[fm createFileAtPath:[savePanel filename] contents:data attributes:nil];
where myArray, is simply an array of strings.