Contents

writeImageData(toSavedPhotosAlbum:metadata:completionBlock:)

Writes given image data and metadata to the Photos Album.

Declaration

func writeImageData(toSavedPhotosAlbum imageData: Data!, metadata: [AnyHashable : Any]!, completionBlock: (@Sendable (URL?, (any Error)?) -> Void)!)
func writeImageData(toSavedPhotosAlbum imageData: Data!, metadata: [AnyHashable : Any]!) async throws -> URL?

Parameters

  • imageData:

    Data for the image to add to the album.

  • metadata:

    The metadata to associate with the image.

  • completionBlock:

    The block invoked after the save operation completes.

    For a description of the block, see Alassetslibrarywriteimagecompletionblock.

Discussion

If there is a conflict between the metadata in the image data and the metadata dictionary, the image data metadata values will be overwritten.

See Also

Saving Assets