A container that provides image content for a single frame of a Live Photo in an editing context.


protocol PHLivePhotoFrame


You don’t create classes that implement this protocol. Instead, you provide a frameProcessor block when editing a Live Photo with the PHLivePhotoEditingContext class. When you process your edits for output or display, Photos calls your block repeatedly to process each frame of the Live Photo’s video and still photo content. On each call, Photos provides the frame’s image content and associated information in an object that adopts this protocol. In that block, you use that object’s image property to access the image to be edited, then perform your edits and return another CIImage object representing the result of processing the input image.


Editing the Frame Image

var image: CIImage

The image content of the frame to be processed.


Getting Information About the Frame

var renderScale: CGFloat

The scale factor of the frame image relative to the Live Photo’s photo content.


var time: CMTime

The time offset, in seconds, of this frame relative to the start of the Live Photo.


var type: PHLivePhotoFrameType

The type of image content in this frame.


enum PHLivePhotoFrameType

Identifiers for the type of frame image to be processed. Used with the type property.

See Also

Editing an Asset

Editing Asset Content

Make a request to modify and save a photo or video asset.

class PHContentEditingInput

A container that provides information about and access to the image, video, or Live Photo content of an asset to be edited.

class PHContentEditingOutput

A container to which you provide the results of editing the photo, video, or Live Photo content of a Photos asset.

class PHAdjustmentData

A description of the edits made to an asset's photo, video, or Live Photo content, which allows your app to reconstruct or revert the effects of prior editing sessions.

class PHContentEditingInputRequestOptions

A set of options affecting the delivery of image or video data when you request to edit the content of a Photos asset.

class PHLivePhotoEditingContext

An editing session for modifying the photo, video, and audio content of a Live Photo.

func canPerform(PHAssetEditOperation) -> Bool

Returns whether the asset supports the specified editing operation.

enum PHAssetEditOperation

Values identifying possible actions an asset can support, used by the canPerform(_:) method.

func cancelContentEditingInputRequest(PHContentEditingInputRequestID)

Cancels a request for editing the asset’s content.

typealias PHContentEditingInputRequestID

An identifier for an asset content editing session.

Editing Request Info Keys

Keys indicating the status of an asset content editing request, used in the completion handler of the requestContentEditingInput(with:completionHandler:) method.