This is not a link to the main package. This is the path to the resources folder and plist inside this folder.
Hence the function name pathForResource...
Everything in the main set is cryptographically signed when compiling the application. However, the resource folder does not exist. You are free to write on and off of this.
for @jrturton
// we need to get the plist data... NSString *plistPath = [[NSBundle mainBundle] pathForResource:@"Symptoms" ofType:@"plist"]; NSMutableArray *dataArray = [[NSMutableArray alloc] initWithContentsOfFile:plistPath]; // add a new entry NSDictionary *addQuestion = [[NSDictionary alloc] initWithObjectsAndKeys:@"Blank.png",@"Icon", [NSString stringWithFormat:@"%i",r],@"ID", [titleTextField text],@"Title", [questionTextField text],@"Text", qnType,@"Type", @"1",@"Custom", [NSArray arrayWithObjects:@"Yes",@"No",nil],@"Values", [unitsTextField text],@"Units", nil]; [dataArray addObject:addQuestion]; [addQuestion release]; // rewrite the plist [dataArray writeToFile:plistPath atomically:YES];
source share