Question

I'm trying to set the document type (the Kind field in the Finder get info field), but it still lists the placeholder DocumentType even with this:

    <key>CFBundleDocumentTypes</key>
<array>
    <dict>
        <key>CFBundleTypeExtensions</key>
        <array>
            <string>dotpaint</string>
        </array>
        <key>CFBundleTypeIconFile</key>
        <string>docIcon.png</string>
        <key>CFBundleTypeName</key>
        <string>dotpaint Document</string>
        <key>CFBundleTypeOSTypes</key>

Am I doing anything wrong?

Was it helpful?

Solution

Have you tried exporting your custom UTI type in the .plist file? Take a look at UTExportedTypeDeclarations in Apple's docs. Should be something like this:

<key>UTExportedTypeDeclarations</key>
<array>
    <dict>
        <key>UTTypeDescription</key>
        <string>My file type</string>
        <key>UTTypeConformsTo</key>
        <array>
            <string>public.data</string> // ... or whatever you want it to conform to
        </array>
        <key>UTTypeIdentifier</key>
        <string>com.mycompany.myapp</string>
        <key>UTTypeTagSpecification</key>
        <dict>
            <key>public.filename-extension</key>
            <array>
                <string>dotpaint</string>
            </array>
        </dict>
    </dict>
</array>
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top