Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/macos/10.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Macos OSX应用程序-关联的文件类型和图标未更新(启动服务)_Macos_Cocoa_Info.plist_File Association_Launch Services - Fatal编程技术网

Macos OSX应用程序-关联的文件类型和图标未更新(启动服务)

Macos OSX应用程序-关联的文件类型和图标未更新(启动服务),macos,cocoa,info.plist,file-association,launch-services,Macos,Cocoa,Info.plist,File Association,Launch Services,我有一个mac应用程序可以打开“.png”文件类型。我可以让应用程序使自己成为打开“.png”文件的默认应用程序,双击这些文件将启动我的应用程序 但是,我似乎无法更新.png文件上的图标-它显示的默认图标是图像的缩略图 我的项目中有一个名为ICON.icns的文件,Info.plist文件中有以下块: <key>CFBundleDocumentTypes</key> <array> <dict> <key>CFB

我有一个mac应用程序可以打开“.png”文件类型。我可以让应用程序使自己成为打开“.png”文件的默认应用程序,双击这些文件将启动我的应用程序

但是,我似乎无法更新.png文件上的图标-它显示的默认图标是图像的缩略图

我的项目中有一个名为ICON.icns的文件,Info.plist文件中有以下块:

<key>CFBundleDocumentTypes</key>
<array>
    <dict>
        <key>CFBundleTypeExtensions</key>
        <array>
            <string>png</string>
        </array>
        <key>CFBundleTypeIconFile</key>
        <string>ICON</string>
        <key>CFBundleTypeName</key>
        <string>PNG</string>
        <key>CFBundleTypeRole</key>
        <string>Viewer</string>
    </dict>
</array>
CbundleDocumentTypes
CbundleTypeExtensions
巴布亚新几内亚
CbundleTypeConfigile
偶像
CbundleTypeName
巴布亚新几内亚
CbundleTypeRole
观众
奇怪的是,如果我重新启动电脑,图标会更新,但大约一秒钟后会变回系统默认值

谢谢