简体   繁体   中英

How do I set file type icons on macOS for my app?

On Windows, I can do this by adding entries to the registry. As far as I know, macOS has no such thing so how do apps set the corresponding file type icons for their format?

In Xcode, click on the project (the very upper-left-most item in the Project navigator), and then select your application's target in the content pane. In the "Info" tab, you will see "Document Types". This is where you can define the document types your app supports, as well as the icons that are associated with them. If this is set up correctly in your app, the OS will automatically handle setting the icons for files that your app supports.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM