A partial set of pixel buffer creation attributes. This struct is useful for conveying partial requirements for
pixel buffers to clients. This struct makes all properties of ``CVPixelBuffer/CreationAttributes`` optional.
Create an instance using a freeform attribute dictionary
This dictionary should only contain the pixel buffer attributes that ``CVPixelBufferCreate`` function accepts.
get · iOS 26.0+
rawAttributes
TypeScript
get rawAttributes(): Record<string, SDKHandle>
Swift declaration
var rawAttributes: [String : any Sendable] { get }
get · iOS 27.0+
attachments
TypeScript
get attachments(): (CVAttachmentContainer<CVPixelBufferAttachmentKeyDefinitions>) | null
Swift declaration
var attachments: CVAttachmentContainer<CVPixelBufferAttachmentKeyDefinitions>? { get set }
Attachments to set on the pixel buffer.
set · iOS 27.0+
attachments
TypeScript
set attachments(value: (CVAttachmentContainer<CVPixelBufferAttachmentKeyDefinitions>) | null)
Swift declaration
var attachments: CVAttachmentContainer<CVPixelBufferAttachmentKeyDefinitions>? { get set }
subscript(dynamicMember keyPath: WritableKeyPath<CVPixelBufferCreationAttributes, CVPixelFormatDescription.Compatibility>) -> CVPixelFormatDescription.Compatibility { get set }
subscript(dynamicMember keyPath: WritableKeyPath<CVPixelBufferCreationAttributes, CVPixelBufferCreationAttributes.Backing>) -> CVPixelBufferCreationAttributes.Backing { get set }
get pixelFormatTypes(): (Array<CVPixelFormatType>) | null
Swift declaration
var pixelFormatTypes: [CVPixelFormatType]? { get set }
Allow multiple pixel formats to be specified in attributes
Setting this property will override the single format value set by ``CVPixelBufferCreationAttributes/pixelFormatType`` and
vice-versa. When accessing ``CVPixelBufferCreationAttributes/pixelFormatType``, only the first value is used if multiple
format values are set. Do not set this value to an empty array.
set · iOS 26.0+
pixelFormatTypes
TypeScript
set pixelFormatTypes(value: (Array<CVPixelFormatType>) | null)
Swift declaration
var pixelFormatTypes: [CVPixelFormatType]? { get set }
Allow multiple pixel formats to be specified in attributes
Setting this property will override the single format value set by ``CVPixelBufferCreationAttributes/pixelFormatType`` and
vice-versa. When accessing ``CVPixelBufferCreationAttributes/pixelFormatType``, only the first value is used if multiple
format values are set. Do not set this value to an empty array.
Resolve multiple attribute specifications into a single instance.
This is useful when you need to resolve multiple requirements between different potential clients of a buffer.