Contents

preferredFilenameExtension(forType:)

Returns the preferred filename extension for the specified Uniform Type Identifier (UTI).

Declaration

func preferredFilenameExtension(forType typeName: String) -> String?

Parameters

  • typeName:

    A string containing the UTI.

Return Value

The appropriate filename extension for typeName, or nil if no extension could be determined.

Discussion

You can safely call this method from any thread of your app.

See Also

Manipulating Uniform Type Identifier Information