I'm creating an application for Mac OS X, and I wanted to know whether I've used UTIs properly in the application's .plist file:
<key>UTExportedTypeDeclarations</key>
<array>
<dict>
<key>UTTypeIdentifier</key>
<string>com.petroules.silverlock.database</string>
<key>UTTypeDescription</key>
<string>Silverlock Database File</string>
<key>UTTypeIconFile</key>
<string>app.icns</string>
<key>UTTypeConformsTo</key>
<array>
<string>public.data</string>
</array>
<key>UTTypeTagSpecification</key>
<dict>
<key>com.apple.ostype</key>
<string>SDBX</string>
<key>public.filename-extension</key>
<array>
<string>sdbx</string>
</array>
<key>public.mime-type</key>
<string>application/octet-stream</string>
</dict>
</dict>
</array>
This code appears to work, although double-clicking a .sdbx file in Finder doesn't cause my application to open the file itself... but that might just be my code (something I'll look into later).
Also, the format of my file type is encrypted content encoded in base-64... is application/octet-stream the best MIME type to use for that or is there something else I should use, and could I possibly run into compatibility issues anywhere in the spectrum by using a less common MIME type?
Also, I included the following code:
<key>CFBundleDocumentTypes</key>
<array>
<dict>
<key>CFBundleTypeExtensions</key>
<array>
<string>sdbx</string>
</array>
<key>CFBundleTypeIconFile</key>
<string>app.icns</string>
<key>CFBundleTypeName</key>
<string>com.petroules.silverlock.database</string>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>LSItemContentTypes</key>
<array>
<string>com.petroules.silverlock.database</string>
</array>
<key>LSHandlerRank</key>
<string>Owner</string>
</dict>
</array>
Should I include this at all because I have the UTI code above? Is this necessary? What are the differences between the two? I wasn't really able to ascertain that from the documentation. Thanks :)