You can use plist.
It is very easy to save list of string or other data without using core data.
See Property List Programming Guide
For example, this code will save an object (rootObj) which can be an array or a dictionary:
NSString *error;
NSString *rootPath = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) objectAtIndex:0];
NSString *plistPath = [rootPath stringByAppendingPathComponent:@"yourFile.plist"];
NSData *plistData = [NSPropertyListSerialization dataFromPropertyList:rootObj
format:NSPropertyListXMLFormat_v1_0
errorDescription:&error];
if(plistData) {
[plistData writeToFile:plistPath atomically:YES];
}
else {
NSLog(@"Error : %@",error);
[error release];
}
There is some limitation on supported class (see the guide)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…