Instance Method

preferredFilenameExtensionForType:

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

Declaration

- (NSString *)preferredFilenameExtensionForType:(NSString *)typeName;

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

- typeOfFile:error:

Returns the uniform type identifier of the specified file, if it can be determined.

- localizedDescriptionForType:

Returns the localized description for the specified Uniform Type Identifier (UTI).

- filenameExtension:isValidForType:

Returns whether the specified filename extension is appropriate for the Uniform Type Identifier (UTI).

- type:conformsToType:

Returns a Boolean indicating that the first Uniform Type Identifier (UTI) conforms to the second UTI.

- URLForApplicationWithBundleIdentifier:

Returns the URL for the app with the specified identifier.