我应该使用哪种 Mac 应用程序支持子文件夹名称约定? (不想被拒绝)
我正在寻找应该保存我的应用程序内容的位置,经过快速搜索后我发现了这个: Cocoa相当于.NET的Environment.SpecialFolder,用于保存首选项/设置? 还有这个: https://developer.apple.com/library/mac/#documentation/FileManagement/Conceptual/FileSystemProgrammingGUIde/AccessingFilesandDirectories/AccessingFilesandDirectories.html#//apple_ref/doc/uid/TP40010672-CH3-SW3
然后我查看了我的应用程序支持文件夹,发现几乎每个应用程序都使用 AppName,而不是苹果在其文档中建议的 BundleID。
我想确保我选择正确的一个,因为我听说某些应用程序因在 ~/Library/Application Support/ 子目录中写入名称与应用程序名称不同而被拒绝。
- 简而言之:
您认为我应该使用哪种命名约定? 他们审查应用程序的时间重要吗?两个都好吗?
谢谢
I am looking for where I should save my app stuff, and after a quick search I found this:
Cocoa equivalent of .NET's Environment.SpecialFolder for saving preferences/settings?
and this:
https://developer.apple.com/library/mac/#documentation/FileManagement/Conceptual/FileSystemProgrammingGUide/AccessingFilesandDirectories/AccessingFilesandDirectories.html#//apple_ref/doc/uid/TP40010672-CH3-SW3
Then I look at my Application Support Folder and noticed that almost every app uses the AppName and not the BundleID as apple suggests in its documentation.
I want to make sure I choose the right one, because I heard that some apps got rejected for writing in a ~/Library/Application Support/ subdirectory with different name than the app's name.
- IN SHORT:
Which naming convention you think I should use?
Does it matter when they are reviewing apps? Both are OK?
Thank you
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
好吧,回答我自己的问题,只是为了不按原样离开...
我刚刚调用 NSSearchPathForDirectoriesInDomains( NSApplicationSupportDirectory, NSUserDomainMask, YES );获取应用程序支持文件夹并附加应用程序名称。
我几乎不相信类似的事情会成为拒绝的原因,因为即使应用程序被沙箱化, NSApplicationSupportDirectory 似乎也会返回正确的文件夹。
Well, answering my own question, just to not leave as is...
I just called NSSearchPathForDirectoriesInDomains( NSApplicationSupportDirectory, NSUserDomainMask, YES ); to get the application support folder and appended the App name.
I hardly believe something like that will be a reason for a rejection, as NSApplicationSupportDirectory appears to return te correct folder even when the app is sandboxed.