Creates a metadata format description object specified by the key.


func CMMetadataFormatDescriptionCreateWithKeys(allocator: CFAllocator?, metadataType: CMMetadataFormatType, keys: CFArray?, formatDescriptionOut: UnsafeMutablePointer<CMMetadataFormatDescription?>) -> OSStatus



CFAllocator to be used. Pass NULL or kCFAllocatorDefault to use the default allocator.


The type of metadata (kCMMetadataFormatType_Boxed).


Array of metadata keys. Each key is a dictionary of key properties. The required properties are:

  • kCMMetadataFormatDescriptionKey_Namespace

  • kCMMetadataFormatDescriptionKey_Value

  • kCMMetadataFormatDescriptionKey_LocalID


Returns newly created metadata CMFormatDescription.

Return Value

A result code. Returns noErr if successful.

See Also

Metadata-Specific Functions

func CMSwapBigEndianMetadataDescriptionToHost(UnsafeMutablePointer<UInt8>, Int) -> OSStatus

Converts a MetadataDescription data structure from big-endian to host-endian in place.

func CMSwapHostEndianMetadataDescriptionToBig(UnsafeMutablePointer<UInt8>, Int) -> OSStatus

Converts a MetadataDescription data structure from host-endian to big-endian in place.

func CMMetadataFormatDescriptionGetIdentifiers(CMMetadataFormatDescription) -> CFArray?

Gets an array of metadata identifiers from a metadata format description.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software