Class

PHProjectExtensionContext

An object that provides Photos project extensions with access to the underlying project, as well as to the user's photo library for editing.

Declaration

@interface PHProjectExtensionContext : NSExtensionContext

Overview

When a Photos project extension is initialized, it is handed an extension context object. This object provides the extension with access to the underlying project, as well as the photo library from which assets are fetched and edited.

Topics

Accessing the Project and the Photo Library

project

A read-only version of the project being edited.

photoLibrary

A read-only version of the photo library being modified.

Updating Assets

- showEditorForAsset:

Invokes the built-in photo editor for the given asset.

- updatedProjectInfoFromProjectInfo:completion:

Creates an updated PHProjectInfo instance from existing project information and current assets.

Relationships

Inherits From

See Also

macOS Photos Project Extensions

Creating a Slideshow Project Extension for Photos

Augment the macOS Photos app with extensions that support project creation.

PHProject

A representation of a Photos app project extension.

PHProjectInfo

Information about the project extension.

PHProjectElement

The superclass for all element objects.

PHProjectSection

A collection of content representing curated asset and text elements.

PHProjectRegionOfInterest

A representation of a region of interest in a photo asset.

PHProjectChangeRequest

A request to change asset data in a Photos project extension.

PHProjectExtensionController

A protocol defining the life cycle and supported types of project extensions.

PHCloudIdentifier

A cloud identifier for a Photos project extension.

PHProjectCategory

A representation of Photos project extension categories.