I’m using a plist to store bookmarks as a simple array of strings.
I can load a plist from my project directory with no problem, but when I make changes to the plist it doesn’t show up on the file in my project directory. Instead, the changes to the plist are being saved in a temporary directory used by the simulator.
Is there anyway to tell xcode to use the plist that’s in the project directory?
When I run the app again my saved changes to this plist file are not seen since it loads the data from the project directory, then saves it again to the temp simulator folder.
From what I understand the app should change the contents of the plist. If that’s the case, you should not load the file from the projects-directory. Those files are not to be changed once the app is shipped.
Instead, you should load and save the plist file in the Documents/ directory of your app bundle. That way, it will also be synced with iCloud if you want it to.
So, do something like … if there’s no file in the Documents/ directory, copy it to Documents/ from the bundle (assuming there are some default values in it). If there is a file, load it from Documents/ and work with it.