许多捆绑包的组织(如 System Preferences.app)
我正在开发一个项目,该项目将许多单独的包按类别组织到类似系统偏好设置的屏幕上。
首先,系统偏好设置如何将其偏好窗格组织成类别?快速浏览一下首选项窗格的捆绑包,没有发现明显的类别信息。
其次,我应该如何将我的捆绑包分类?现在,我有嵌套的捆绑包,其中类别捆绑包几乎只是一个包含类别名称及其子捆绑包顺序的 Info.plist。
当然,在 Xcode 中进行管理是令人厌恶的。我尝试过单独的项目;我尝试过一个有很多目标的大项目;似乎没有什么是干净的。
I'm working on a project which organizes many separate bundles onto a System Preferences-like screen, in categories.
First, how does System Preferences organize its pref panes into categories? A quick glance in the pref panes' bundles reveals no obvious category info.
Second, how should I organize my bundles into categories? Right now, I've got nested bundles, where the category bundles are pretty much just an Info.plist with the category's name and the order of its sub-bundles.
This is, of course, disgusting to manage in Xcode. I've tried separate projects; I've tried one big project with many targets; nothing seems clean.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
第一个问题:
系统偏好设置以一种非常简单的方式按类别组织其偏好窗格:前 4 个类别保留给 Apple,他们以自己喜欢的方式组织其中的项目。
您的首选项窗格将添加到“其他”类别中,并按字母顺序在其他首选项窗格中排序。
第二个问题:
我会为“System Preferences like.app”做一个项目,以及与 pref 窗格一样多的项目。
如果您希望有办法一次性构建“System Preferences like”应用程序及其所有首选项窗格,请将首选项窗格项目作为依赖项添加到“System Preferences like”项目。
First question:
System Preferences organizes its pref panes by categories in a very simple way: the first 4 categories are reserved to Apple, and they organize the items in it in a way they like.
Your pref pane will be added to the category Other, ordered among the others pref panes by alphabetic order.
Second question:
I would do one project for the "System Preferences like.app", and as many project as pref panes.
If you want to have a way to build the "System Preferences like" app and all its pref pane at once, add the pref pane projects as a dependency to the "System Preferences like" project.