UTI for SceneKit Scene (scn) files

Is there a UTI for SceneKit Scene files with the .scn extension?

Accepted Reply

Hi diamondminder,


The SceneKit UTI is: com.apple.scenekit.scene


and it conforms to public.3d-content (all the file formats that should be readable by ModelIO/SceneKit).

Replies

Can you elaborate on the UTI acronym ?

Hi diamondminder,


The SceneKit UTI is: com.apple.scenekit.scene


and it conforms to public.3d-content (all the file formats that should be readable by ModelIO/SceneKit).

I'm using the new Document-Based App template in Xcode 9 Beta 6. I can't get the app to recognize SceneKit scene files as a type. I think I need to set the extension to .scn somewhere, but I can't see where to set this. In previous versions of Xcode, Document Type and UTIs had an "Extensions" field, but this field has now gone. The WWDC 2017 video, and most tutorials I can find, walk you through the process of setting this up for "Exported UTIs", but what about "Imported UTIs". What do I need to put in the "Document Type" fields and the "Imported UTIs" fields in Xcode 9?

Just to answer my own question: I did need to add the .scn extension to the "Imported UTIs" field. I added a Dictionary called UTTypeTagSpecification. Inside that I put an array called public.filename-extension. In the array I added a string with the value scn. Strangely, these keys aren't present in the autocomplete options for the plist, you have to type them both in manually, which seem strange as they appear to be necessary to get it working. I wonder whether this is worth raising as a bug?

Does anyone know if there's an Apple-provided constant for the SceneKit UTI "com.apple.scenekit.scene"?


There are constants for the file extensions .obj, .abc, .ply, .stl and .usd here: https://developer.apple.com/documentation/modelio/model_i_o_constants

... but I couldn't find any variable starting with "kUTType" for the extension .scn