我假设如果我在某些时候运行我的应用程序时工作,我保存的文档会突然显示给定的图标.
如果这很重要,文档将从一组基于NSCoder的类中保存.单击这些文档也会打开我的应用程序并正确加载文件,因此很困惑我错过了以便在文件上显示图标….
<?xml version="1.0" enCoding="UTF-8"?><!DOCTYPE pList PUBliC "-//Apple//DTD PList 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"><pList version="1.0"><dict> <key>CFBundleDevelopmentRegion</key> <string>en</string> <key>CFBundledocumentTypes</key> <array> <dict> <key>CFBundleTypeExtensions</key> <array> <string>myapp</string> </array> <key>CFBundleTypeIconfile</key> <string>MyApp</string> <key>CFBundleTypeOSTypes</key> <array> <string>ASWM</string> </array> <key>CFBundleTypename</key> <string>MyApp project file</string> <key>CFBundleTypeRole</key> <string>Editor</string> </dict> </array> <key>CFBundleExecutable</key> <string>${EXECUtable_name}</string> <key>CFBundleIconfile</key> <string>MyApp</string> <key>CFBundleIDentifIEr</key> <string>com.workmonkeys.${PRODUCT_name:rfc1034IDentifIEr}</string> <key>CFBundleInfoDictionaryVersion</key> <string>6.0</string> <key>CFBundlename</key> <string>${PRODUCT_name}</string> <key>CFBundlePackageType</key> <string>APPL</string> <key>CFBundleShortVersionString</key> <string>1.0</string> <key>CFBundleSignature</key> <string>ASWM</string> <key>CFBundLeversion</key> <string>1</string> <key>LSApplicationcategoryType</key> <string>public.app-category.developer-tools</string> <key>LSMinimumSystemVersion</key> <string>${MACOSX_DEPLOYMENT_TARGET}</string> <key>NSHumanReadablecopyright</key> <string>copyright © 2012 Me. All rights reserved.</string> <key>NSMainNibfile</key> <string>MainMenu</string> <key>nsprincipalClass</key> <string>NSApplication</string></dict></pList>解决方法 当我最初创建我的应用程序时,系统必须已经缓存了pList的旧副本.所需要的只是重建启动服务数据库.
我使用了lsregister命令,如下所示……
http://www.tuaw.com/2009/06/11/terminal-tips-rebuild-your-launch-services-database-to-clean-up/
重新运行应用程序并将宾果文件现在分别关联相应的图标.
总结以上是内存溢出为你收集整理的macos – CFBundleTypeIconFile未显示给定文件扩展名的图标全部内容,希望文章能够帮你解决macos – CFBundleTypeIconFile未显示给定文件扩展名的图标所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)