Whenever I want to get data from a plist file I use the following code:
NSString *filePath = [[NSBundle mainBundle] pathForResource:@"FILE_NAME" ofType:@"plist"];
NSDictionary *plistData = [NSDictionary dictionaryWithContentsOfFile:filePath];
But now I’m trying to read in data from the Info plist, and filePath is nil. Is there a different way to get data from the Info plist?
From an earlier SO answer of mine. Attributes from the info.plist for your project are directly accessible by the following…
Your filePath is nil simply because it can’t find the file – check spellings & check if the file you are trying to read from is actually in the bundle etc.