I see all kinds of examples for using a file or an extension but I am trying to call let imag = NSWorkspace.shared.icon(for: <#T##UTType#>) and I don't see any init method in UUType that takes a identifier e.g. folder.
CodePudding user response:
UTType is declared in the Uniform Type Identifiers framework.
All uou need to do is import UniformTypeIdentifiers and then you'll be able to write things like UTType.folder.
