1
votes

I'm currently developing a QuickLook generator that will convert an existing file into a 3D Collada DAE format which is supported by QuickLook out of the book and can be zoomed/panned around directly in QuickLook window. I have looked over the Apple QuickLook document which even mentioned that if you convert a document representing a 3D model into Collada DAE format, Quick Look can display a preview interface allowing the model to be zoomed and rotated.

However, what I came across is that the part where I need to pass the data to QuickLook requires a content type UTI in third argument, as provided in the documentation. (In this case, the type is RTF)

QLPreviewRequestSetDataRepresentation(preview,
                                      (__bridge CFDataRef)rtfData,
                                      kUTTypeRTF,
                                      NULL);

However, I have no idea what to do to display DAE file. What is its UTI ?

1

1 Answers

1
votes

To determine the UTI of any file on OS X, you can launch mdls path/to/file in the Terminal. One of the attributes is kMDItemContentType. This is the UTI of the file. For a Collada file this returns:

kMDItemContentType             = "org.khronos.collada.digital-asset-exchange"

So you can use CFSTR("org.khronos.collada.digital-asset-exchange") as the argument you're looking for (there is no pre-defined constant for it).