I’m new to objective-c and would like to understand how to set a file path to the app’s home directory. For testing and development I’ve been manually putting in the path of the property list on my hard drive but now I want to bundle it – or just archive and distribute it to test as an application without Xcode test building… I’ve been using this…
NSString* pListPath = @"/Users/-----/Saves/Resourcing/resourcingProperties.plist";
NSMutableDictionary *pListDictionary = [[NSMutableDictionary alloc] initWithContentsOfFile:pListPath];
NSMutableDictionary* interfaceKeysDictionary = [pListDictionary valueForKey:@"Interface Keys"];
NSMutableDictionary* valueSavesDictionary = [pListDictionary valueForKey:@"Value Saves"];
How do I use the path of app’s home directory once the application is bundled as a stand-alone app in my Application folder?
For what you’re trying to do, you don’t want or need to read the plist file directly. You just call:
You can then add to it in code as you see fit.