开发者

where to store data in Cocoa app?

I hope to migrate one of my windows app to mac.

As we know, on vista/win7, there are public data directories that one app can add, save and delete d开发者_运维技巧ata files without RAC permission.

Are there same directories on Mac/Cocoa?

or

I can store the data to any directory without any problem and any permission?

Welcome any comment


These are the 3 you can write to:

~/Library/Application Support/app-identifier

~/Library/app-identifier

~/Library/Caches/app-identifier

(replace app-identifer with your app identifier)

More info here under "File-System Usage Requirements for the Mac App Store"


You can, by default, unless you enable sand-boxing, write to any directory the user has access to. Generally though, Cocoa apps store data in the user's home directory in ~/Library/Application Support/<your-app-name>

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜