Create a plist iPhone SDK -


I am trying to set up a method that is on a given file path. Plist creates the file, though my current code only works to modify a plast is an easy way to create a plast file? This is the first draft of the method, the last version will be a variable for the course_title.

  - (zero) writeToPlist {NSString * filePath = [NSString stringWithFormat: @ "% @ / course_title", DOCUMENTS_FOLDER] ; NSMutableDictionary * plistDict = [[NSMutableDictionary alloc] initWithContentsOfFile: filePath]; [PlistDict Set Value: @ "1.1.1" forKey: @ "ProductVersion"]; [PlistDict writeToFile: File path atomic: Yes]; }  

Thanks for the code

goes to an empty dictionary Use

  NSMutableDictionary * plistDict = [NSMutableDictionary dictionary]; Instead of reading it from the file  

then you proceed as you did earlier.


Comments

Popular posts from this blog

sql - dynamically varied number of conditions in the 'where' statement using LINQ -

asp.net mvc - Dynamically Generated Ajax.BeginForm -

Debug on symbian -