Hi,
I've created a pList (myData.plist) in XCode & populated it, but when I run the program it's not being copied to the iphone simulator directory. Hence, I can't read from it. I've logged the filename and it appears to be pointing to the correct place, there's just no plist file there (confirmed in Finder)
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *documentsDirectoryPath = [paths objectAtIndex:0];
NSString *pListFileName = [documentsDirectoryPath stringByAppendingPathComponent:@"myData.plist"];
NSLog(pListFileName);
NSFileManager *fileManager = [NSFileManager defaultManager];
if ([fileManager fileExistsAtPath: pListFileName]) {
self.pList = [[NSMutableDictionary alloc] initWithContentsOfFile:pListFileName];
//code for reading data in plist
}