将侧边栏图标添加到我的 FinderSync 扩展

Adding a Sidebar Icon to my FinderSync extension

我正在根据以下文档开发 FinderSync 扩展:

https://developer.apple.com/library/ios/documentation/General/Conceptual/ExtensibilityPG/Finder.html

我添加侧边栏图标失败。

我已按照以下步骤操作:创建了 .iconset 文件夹并在其中填充了请求的 PNG。将文件夹添加到我的 info.plist

但是我在我监控的文件夹的边栏中没有看到任何图标。

上下文菜单、工具栏按钮和徽章工作正常。

我可能遗漏了什么?是否有文档未提及的任何限制?第 4 步有什么棘手的地方吗?

显然遵守 Apple 对图标的限制确实非常重要: 他们必须

"monochromatic images that are drawn just using black and transparency"

令我惊讶的是,当一位设计师给我 png 符合上述要求的东西时,一切都很顺利。

由于文档非常缺乏,如果您遇到任何其他困难,请发表评论。

文档提到了几个例外情况,您的应用程序图标不会替换文件夹的图标:

The sidebar icons you provide will replace the default folder icons in the Finder’s sidebar for any of the root folders that your extension is monitoring.

This icon does not replace the icon for any folders contained by your monitored folder.

It also does not replace the icon for any system folders that you may be monitoring (for example, Documents, Desktop, Applications, and Downloads).

https://developer.apple.com/library/archive/documentation/General/Conceptual/ExtensibilityPG/Finder.html