Type Method


Returns a Boolean value that indicates whether the MDLAsset class can write asset data as a file with the specified format extension.


class func canExportFileExtension(_ extension: String) -> Bool



The filename extension identifying an asset file format.

Return Value

true if the MDLAsset class can export asset data in the format with the specified extension; otherwise, false.


If this method returns true, you can use the export(to:) method to write an asset to a file using the format identified by the specified extension.

The set of supported formats includes Wavefront Object (.obj) and Standard Tessellation Language (.stl). Additional formats may be supported as well.

See Also

Exporting an Asset

func export(to: URL)

Writes asset data to a file at the specified URL and reports errors that occur during export.