Contents

replacementMetadata(for:)

A callback in which you can provide replacement metadata or direct Avcapturephoto to strip existing metadata from the flattened file.

Declaration

optional func replacementMetadata(for photo: AVCapturePhoto) -> [String : Any]?

Parameters

  • photo:

    The calling instance of Avcapturephoto whose file metadata you’re modifying.

Return Value

A dictionary of keys and valyes from CGImageProperties. To preserve existing metadata, return photo.metadata. To strip existing metadata, return nil. To replace metadata, pass a replacement dictionary.

Discussion

This callback is optional. If your delegate doesn’t implement this callback, the existing metadata in the in-memory AVCapturePhoto container is written directly to the file data representation.

See Also

Replacing or removing metadata