OK, so here's the deal :
.xyz.xyz files - if that matters at all - is a Package file.Now, here's how the filetype-specific portion of my info.plist looks like :
CFBundleDocumentTypes = (
{
CFBundleTypeExtensions = ( "xyz" );
CFBundleTypeIconFile = "xyz-icon";
CFBundleTypeName = "XYZ file";
CFBundleTypeRole = "Viewer";
LSTypeIsPackage = "1";
}
);
However, the .xyz package files are still shown as folders and NOT as a single file ("package"). What am I doing wrong?
HINT : I've managed to do that in the past, but I simply cannot remember if I'm missing something. Perhaps the system has to be restarted? I have no idea...
If you found this stackoverflow page because LSTypeIsPackage isn't working for you, it might be because you're using LSItemContentTypes to declare your document type. The use of LSItemContentTypes makes the system ignore LSTypeIsPackage (which isn't the case in this stackoverflow question).
If you're using LSItemContentTypes, you need to make your exported type conform to com.apple.package. Example:
CFBundleDocumentTypes
LSItemContentTypes
Item 0 = com.example.xyz
CFBundleTypeExtensions
Item 0 = xyz
CFBundleTypeRole = Editor
etc.
UTExportedTypeDeclarations
Item 0
UTTypeIdentifier = com.example.xyz
UTTypeConformsTo
Item 0 = public.data // or whatever
Item 1 = com.apple.package <-------------
UTTypeDescription = XYZ Document
etc.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With