Hi i am trying to write an NSDictionary to a plist in the documents folder, but unable to write , i am using the writeToFile:atomically: method , which returns False. The complete code is
-(void)writeData:(NSDictionary *)dicResponseData
{
// get paths from root directory
NSArray *paths = NSSearchPathForDirectoriesInDomains (NSDocumentDirectory, NSUserDomainMask, YES);
// get documents path
NSString *documentsPath = [paths objectAtIndex:0];
// get the path to our Data/plist file
NSString *plistPath = [documentsPath stringByAppendingPathComponent:@"Contractors.plist"];
[dicResponseData writeToFile:plistPath atomically: TRUE];
}
the dictionary contains 25 sub dictionaries in it .