macOS Exported UTI that Xcode recognizes it like a java file

Hello,

I try to add an exported UTI for a file with extension "lxb" so that Xcode recognizes it like a java file

Code Block
<key>UTExportedTypeDeclarations</key>
<array>
<dict>
<key>UTTypeIdentifier</key>
<string>com.sun.java-source</string>
<key>UTTypeReferenceURL</key>
<string>http://www.java.com/</string>
<key>UTTypeDescription</key>
<string>Java source</string>
<key>UTTypeIconFile</key>
<string>com.sun.java-source.icns</string>
<key>UTTypeConformsTo</key>
<array>
<string>public.source-code</string>
</array>
<key>UTTypeTagSpecification</key>
<dict>
<key>public.filename-extension</key>
<array>
<string>lxb</string>
</array>
</dict>
</dict>
</array>


but the file isn't highlighting in Xcode

Thanks
Answered by pol2095 in 647533022
it work for types unknown by the system, but if the type is know by the system, the type is not overriden ?
Accepted Answer
it work for types unknown by the system, but if the type is know by the system, the type is not overriden ?
when I use
Code Block
mdls -name kMDItemContentType /Users/jcs/Desktop/myFile.lxb

return
Code Block
kMDItemContentType = "dyn.ah62d4rv4ge80c63y"

and not
Code Block
kMDItemContentType = "com.sun.java-source"

I have missing somethind in my exported UTI ?


Please delete this thread, thanks.
macOS Exported UTI that Xcode recognizes it like a java file
 
 
Q