<!--
{
  "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/init(livePhotoEditingInput:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "Photos"
    ],
    "preciseIdentifier" : "c:objc(cs)PHLivePhotoEditingContext(im)initWithLivePhotoEditingInput:"
  },
  "title" : "init(livePhotoEditingInput:)"
}
-->

# init(livePhotoEditingInput:)

Creates a Live Photo editing context for the specified editing input.

```
init?(livePhotoEditingInput livePhotoInput: PHContentEditingInput)
```

## Parameters

`livePhotoInput`

A content editing input object representing the Live Photo for which to perform editing.

## Return Value

A new Live Photo editing context, or `nil` if the provided content editing input does not represent a Live Photo.

## Discussion

In an app using the Photos framework, you obtain a [`PHContentEditingInput`](/documentation/Photos/PHContentEditingInput) object by calling [`requestContentEditingInput(with:completionHandler:)`](/documentation/Photos/PHAsset/requestContentEditingInput(with:completionHandler:)) method of a [`PHAsset`](/documentation/Photos/PHAsset) object that you’ve previously fetched.

In a photo editing extension that runs within the Photos app, your extension’s main view controller (which adopts the [`PHContentEditingController`](/documentation/PhotosUI/PHContentEditingController) protocol) receives a [`PHContentEditingInput`](/documentation/Photos/PHContentEditingInput) object when the user chooses to edit a Live Photo with your extension.

You can create a Live Photo editing context only from [`PHContentEditingInput`](/documentation/Photos/PHContentEditingInput) object that represents a Live Photo. Use the [`livePhoto`](/documentation/Photos/PHContentEditingInput/livePhoto) property of the editing input to verify that it has live Photo content.

---

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)