I have been trying to get the NSKeyedArchiver to write out my data in a human readable form (i.e. not as a binary file) I understand that I can use ...
setOutputFormat: NSPropertyListXMLFormat_v1_0
But ... I just can't seem to get the syntax right, can anyone point me in the right direction?
NSData *artistData;
NSLog(@"(*) - Save All");
artistData = [NSKeyedArchiver archivedDataWithRootObject:artistCollection ];
[artistData writeToFile:@"/Users/fgx/Desktop/stuff" atomically:YES];
EDIT
I added setOutputFormat (see below) but I get a warning at compile, what am I missing?
warning: NSData may not respond to 'setOutputFormat:'
Here is the code I used.
NSLog(@"(*) - Save All");
artistData = [NSKeyedArchiver archivedDataWithRootObject:artistCollection ];
[artistData setOutputFormat: NSPropertyListXMLFormat_v1_0];
[artistData writeToFile:@"/Users/fgx/Desktop/stuff" atomically:YES];
gary