I think I am missing something very basic here, but here it goes.
The inline help in XCode tells me that initWithContentsOfFile: deprecated
NSMutableDictionary *myDict = [[NSMutableDictionary alloc] initWithContentsOfFile:plistPath];
Instead initWithContentsOfFile:encoding:error: should be used.
NSMutableDictionary *myDict = [[NSMutableDictionary alloc] initWithContentsOfFile:plistPath encoding:NSUTF8StringEncoding error:NULL];
My problem is that initWithContentsOfFile: works fine while the code below raises an error.
NSString *plistPath = [[NSBundle mainBundle] pathForResource:@"prefs" ofType:@"plist"];
Load preferences into symbol dictionary
NSMutableDictionary *myDict = [[NSMutableDictionary alloc] initWithContentsOfFile:plistPath encoding:NSUTF8StringEncoding error:NULL];
ERROR:
2011-12-08 16:27:12.209 -[__NSPlaceholderDictionary initWithContentsOfFile:encoding:error:]: unrecognized selector sent to instance 0x4b2a370
2011-12-08 16:27:12.212 *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSPlaceholderDictionary initWithContentsOfFile:encoding:error:]: unrecognized selector sent to instance 0x4b2a370'
As Chris pointed out to me, NSDictionary is working as expected.
I still get the message below when alt-clicking the method in XCode though. Oddly enough the documentation is for NSString and NOT NSDictionary. Should have put my reading goggles on, thanks again Chris for pointing out the answer!