What are the options for saving data in iOS?

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)

Leave a Comment