我的應用程序創建了一些專用於我的應用程序的xml文件,我想將這些文件類型與我的應用程序相關聯,最初我設置了圖標新創建的文件使用setIcon:forFile:選項:但似乎我應該使用plist來代替。在文檔中,我發現如何設置應用程序本身的圖標,但找不到有關如何設置其他關聯文件類型的圖標的任何說明。任何人都可以將我鏈接到這些信息?使用plist(cocoa osx)設置與我的應用程序相關的資源圖標
0
A
回答
2
2
Apple提供有關主題here的概述。有關可用密鑰的細分,請參閱here。
作爲一個例子:
<key>CFBundleDocumentTypes</key>
<array>
<dict>
<key>CFBundleTypeName</key>
<string>typename</string>
<key>CFBundleTypeExtensions</key>
<array>
<string>ext</string>
</array>
<key>CFBundleTypeIconFile</key>
<string>icon.icns</string>
<key>CFBundleTypeRole</key>
<string>Viewer</string>
<key>LSTypeIsPackage</key>
<false />
<key>NSPersistentStoreTypeKey</key>
<string>Binary</string>
</dict>
</array>
相關問題
- 1. 在我的應用程序中將URL與資源相關聯
- 2. 從VS中的資源設置應用程序圖標05
- 3. 如何將URL與使用Cocoa的應用程序相關聯
- 4. 從WPF應用程序中的資源設置圖像源
- 5. 設置應用程序的資源限制(CPU使用率)
- 6. 學習應用程序編程的最佳資源? (.Net/Cocoa/etc)
- 7. COCOA OSX:應用程序重命名
- 8. Cocoa OSX應用程序掛在dispatch_async
- 9. OSX:如何爲我的應用程序設置多個文件圖標?
- 10. 如何在XCode中設置OSX應用程序停靠圖標?
- 11. Android應用程序的設置圖標
- 12. 設置應用程序圖標的WinRT
- 13. 如何將我的OSX Cocoa應用程序連接到Facebook?
- 14. Google是否提供與應用程序相關的Android圖標?
- 15. 應用程序圖標不顯示在MAC OSX 10.5爲我的應用程序
- 16. 如何使用靜態庫分發我的OSX Cocoa應用程序?
- 17. 我需要爲我的應用程序設置圖標菜單
- 18. 如何從應用程序設置的鍵名與值在應用程序設置相關
- 19. 我在哪裏設置iPhone應用程序中的應用程序圖標
- 20. 在我的應用程序中獲取意圖源應用程序的圖標
- 21. 在稀缺的系統資源下測試OSX應用程序
- 22. iPhone應用程序需要plist中的圖標文件設置嗎?
- 23. 使用與以前版本相同的應用程序圖標
- 24. 通過資源文件設置iPhone應用程序
- 25. 在C中使用嵌入式資源圖標作爲應用程序圖標#
- 26. Visual Studio應用程序的資源:「圖標清單」 VS「資源文件」發佈
- 27. REST API設計與相關資源
- 28. 與ML關閉相關的資源?
- 29. OSX Cocoa應用程序的空白進程名稱?
- 30. 從My.Resources設置應用程序圖標?