Do they write/store them within the app bundle/package itself? Or some other canonical location? Or does there not seem to be any standard?
views:
147answers:
3
+14
A:
Files usually go in ~/Library/Application Support/Your App/
. Preferences go in ~/Library/Preferences/
.
Chris Long
2010-01-06 22:03:03
Unless your app is document-based, in which case you store each document file where the user told you to. Also, you should never need to manage your own preferences files; user defaults does that for you. http://developer.apple.com/mac/library/documentation/Cocoa/Reference/Foundation/Classes/NSUserDefaults_Class/
Peter Hosey
2010-01-07 07:32:12
+4
A:
You should decidedly not write files into your app bundle at runtime. There's no guarantee that a user running your app will have permission to modify it. As Chris said, support files go in Application Support and preferences go in ~/Library/Preferences. To find the user's Application Support folder, you can use the NSSearchPathForDirectoriesInDomains()
function. To write preference files, you can use the NSUserDefaults or CFPreferences APIs.
Chuck
2010-01-06 22:09:28