<!--
{
  "availability" : [
    "iOS: 10.0.0 -",
    "iPadOS: 10.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.12.0 -",
    "tvOS: 10.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "PhotoKit",
  "identifier" : "/documentation/Photos/PHLivePhotoEditingContext/prepareLivePhotoForPlayback(withTargetSize:options:completionHandler:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Photos"
    ],
    "preciseIdentifier" : "c:objc(cs)PHLivePhotoEditingContext(im)prepareLivePhotoForPlaybackWithTargetSize:options:completionHandler:"
  },
  "title" : "prepareLivePhotoForPlayback(withTargetSize:options:completionHandler:)"
}
-->

# prepareLivePhotoForPlayback(withTargetSize:options:completionHandler:)

Processes a Live Photo with your edits for viewing.

```
func prepareLivePhotoForPlayback(withTargetSize targetSize: CGSize, options: [String : Any]? = nil, completionHandler handler: @escaping @Sendable (PHLivePhoto?, (any Error)?) -> Void)
```

## Parameters

`targetSize`

The size of the view in which you plan to preview the edited Live Photo output.

`options`

Options that affect Live Photo rendering. See `Live Photo Processing Options`.

`handler`

A block that Photos calls on the main queue after processing is complete. The block takes the following parameters:

- livePhoto: The rendered Live Photo, suitable for displaying in a [`PHLivePhotoView`](/documentation/PhotosUI/PHLivePhotoView) object.
- error: If preparing the edited Live Photo for display succeeds, this parameter is `nil`. If processing fails, the `livePhoto` parameter is `nil`, and this parameter contains an error object describing the failure.

## Discussion

Use this method to generate preview versions of the edited Live Photo—for example, to display in your editing UI.

> Note:
> This method does not guarantee performance appropriate for interactive editing. Instead, you might preview edits interactively using a still image (see the ``doc://com.apple.photokit/documentation/Photos/PHLivePhotoEditingContext/fullSizeImage`` property), and use this method to produce animated reviews upon the user’s request.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)