2012-09-17 42 views
6

我有我的應用程序的以下Info.plist,問題是我用擴展名保存的文件myapp似乎沒有拿起我的MyApp圖標,我從圖標集創建(應用程序正確使用圖標),因此猜測plist中存在錯誤。CFBundleTypeIconFile圖標不顯示給定的文件擴展名

我假設,如果我在運行我的應用程序時在某些點保存的文檔會突然顯示給定圖標,那麼我是否有此工作。

確定這個問題,該文檔是從一組基於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> 

回答

相關問題