[英]In a Cocoa Application for macOS, I save a bundle to disk using NSFileWrapper. How can I get the finder show the correct icon for my bundle?
In a Cocoa Application for macOS, I save a bundle to disk using NSFileWrapper. 在适用于macOS的Cocoa应用程序中,我使用NSFileWrapper将捆绑包保存到磁盘。 The Bundle is correctly saved and recognised as a bundle (Show package contents appear) but I cannot get the finder display the Icon I provide for the bundle.
捆绑软件已正确保存并识别为捆绑软件(出现“显示包装内容”),但我无法使取景器显示我为捆绑软件提供的图标。 Here are my settings for the imported/exported UTIs:
这是我导入/导出的UTI的设置:
Unfortunately, the bundle appears always with a blank file icon: 不幸的是,该捆绑包始终显示为带有空白文件图标:
As you can see, the Finder recognises the file kind, but does not display an image for it. 如您所见,Finder可以识别文件种类,但不会显示图像。 Any help is greatly appreciated.
任何帮助是极大的赞赏。 Thanks
谢谢
In the Exported UTIs section, try setting Conforms To to com.apple.package, public.archive
. 在“ 导出的UTI”部分中,尝试将“ 符合于”设置为
com.apple.package, public.archive
。
I'm no UTI expert, but that has always worked for my apps. 我不是UTI专家,但这一直适用于我的应用程序。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.