<!--
{
  "availability" : [
    "macOS: 10.13.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "PhotoKit",
  "identifier" : "/documentation/PhotosUI/PHProjectExtensionController",
  "metadataVersion" : "0.1.0",
  "role" : "Protocol",
  "symbol" : {
    "kind" : "Protocol",
    "modules" : [
      "PhotosUI"
    ],
    "preciseIdentifier" : "c:objc(pl)PHProjectExtensionController"
  },
  "title" : "PHProjectExtensionController"
}
-->

# PHProjectExtensionController

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

```
protocol PHProjectExtensionController : NSObjectProtocol
```

## Overview

The principal view controller for a Photos project extension must conform to this protocol. Methods in this protocol define the basic life cycle of the extension controller. They allow you to define any number of project types that your extension supports; the Photos app displays these project types to the user as choices when creating a new project. To enable this entry point into the extension, the Info.plist must include this key/value pair in its `NSExtensionAttributes` dictionary.

![Screenshot showing the slideshow category in the information property list for a Photos project extension.](images/com.apple.photokit/media-3029168@2x.png)

Once enabled, Photos asks the extension for its list of supported project types. The option that the user selects when creating a project is passed to the extension as an attribute of [`PHProjectInfo`](/documentation/PhotosUI/PHProjectInfo).

## Topics

### Tracking the Project Extension Life Cycle

[`func beginProject(with: PHProjectExtensionContext, projectInfo: PHProjectInfo, completion: ((any Error)?) -> Void)`](/documentation/PhotosUI/PHProjectExtensionController/beginProject(with:projectInfo:completion:))

Provides an opportunity to customize the initial state when the user creates a project using the extension.

[`func finishProject(completionHandler: () -> Void)`](/documentation/PhotosUI/PHProjectExtensionController/finishProject(completionHandler:))

Provides an opportunity to perform cleanup when a user switches away from the project or terminates the extension.

[`func resumeProject(with: PHProjectExtensionContext, completion: ((any Error)?) -> Void)`](/documentation/PhotosUI/PHProjectExtensionController/resumeProject(with:completion:))

Provides an opportunity to restore or refresh the user interface when the user returns to a previously created project.

[`func typeDescriptionDataSource(for: PHProjectCategory, invalidator: any PHProjectTypeDescriptionInvalidator) -> any PHProjectTypeDescriptionDataSource`](/documentation/PhotosUI/PHProjectExtensionController/typeDescriptionDataSource(for:invalidator:))

Fetches the type description data source to provide the user with more information about the project extension category.

### Defining Supported Project Types

[`var supportedProjectTypes: [PHProjectTypeDescription]`](/documentation/PhotosUI/PHProjectExtensionController/supportedProjectTypes)

An array of project types the extension supports.

## Relationships

### Inherits From

[`NSObjectProtocol`](/documentation/ObjectiveC/NSObjectProtocol)

---

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)