In the previous tip on working with plists, I showed an example of how to create a path to a file to be stored in the /Documents folder.
In this tip I want to show an example that arrives at the same end result, however, I’ll use methods which will eliminate the hardcoding of paths as shown in the first example.
In a recent application I needed to create several property list files (plists) to store application information. I opted to store the files in the folder named “Documents” off the home folder.
Here is the code I used to specify the path where I wanted the files written and the code to build an NSString with the full path.