I have a .json file that I want to be bundled with my application as a resource. I’ve read the File System Programming Guide which says that you should put support files in the <Application_Home>/Library/Application Support. So how do I put my .json file in this directory before building my application?
And how would I reference the file during runtime?
If your file will always be read-only (only updated as part of an app update), then add the file to your app’s resources in your project. Then you simply read the file from the app’s bundle:
If you need to provide an initial file with your app but make updates during runtime then you need to package the file like above, but the first time your app is run you need to copy the file to another, writable location in your app’s sandbox.