Search Results

Search found 1 results on 1 pages for 'suchi'.

Page 1/1 | 1 

  • iOS - how to read and write a plist of this format

    - by Suchi
    I have an xml of the following format - <plist version="1.0"> <array> <dict>...</dict> <dict>...</dict> </array> </plist> I am trying to write it into a plist using - NSDictionary *temp = [NSPropertyListSerialization propertyListWithData:returnData options:NSPropertyListImmutable format:&format error:&errorDesc]; [self writeToPlistFile:@"myList.plist" : temp]; where the method is -(BOOL)writeToPlistFile:(NSString*)filename:(NSDictionary*)data{ NSArray * paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); NSString * documentsDirectory = [paths objectAtIndex:0]; NSString * path = [documentsDirectory stringByAppendingPathComponent:filename]; BOOL didWriteSuccessfull = [data writeToFile:path atomically:YES]; return didWriteSuccessfull; } I then want to read it and place it into a dictionary. How would I do that?

    Read the article

1