Hi,
I've a plist file that sits in a directory called Templates of my .app directory. This plist file is loaded thus without any problems:
NSDictionary *sqlPropertyList = [NSDictionary dictionaryWithContentsOfFile:[[NSBundle mainBundle] pathForResource:CH_PQ_QUERIES ofType:@"plist"]];
I created a .txt file in the same directory and tried to load it the same way:
NSString *filePath = [[NSBundle mainBundle] pathForResource:@"excel2004" ofType:@"xml"];
But filePath
was always null, even though the bundled appeared to be loaded.
What's going on here? Why are plists allowed to sit in subdirectories and other files not? Is the plist file being loaded by accident and I shouldn't rely on this behaviour?
Thanks