Information about the project extension.


class PHProjectInfo : NSObject


macOS Photos automatically generates a PHProjectInfo object when creating a new project. Photos passes along the project information with a PHProjectExtensionContext object. This object contains metadata about the project's creation source, sections, product type, branding, and page numbers. Your extension leverages project information to influence project layout, autoflow, and theme selection. The properties of this class are immutable, and your extension can't instantiate the object directly.


Determining Project Type

var projectType: PHProjectType

The project type that the user selected from the project extension options.

struct PHProjectType

The type descriptor of a project extension.

var creationSource: PHProjectInfo.CreationSource

The source from which the project was created.

var sections: [PHProjectSection]

An array of project sections, each containing one or more section content objects.

class PHProjectTypeDescription

An extensible enumerator for PHProjectType that's presented to users in the project picker.

protocol PHProjectTypeDescriptionDataSource

A protocol that you use to provide the project with type description data.

protocol PHProjectTypeDescriptionInvalidator

A protocol that you use to tell the project when and how to invalidate type and footer text.

enum PHProjectInfo.CreationSource

Defines the source of a project extension.

Creating a Project from an Apple Print Product

var brandingEnabled: Bool

A Boolean value indicating whether branding was enabled in the source project.

var pageNumbersEnabled: Bool

A Boolean value indicating whether page numbering was enabled in the source project.

var productIdentifier: String?

The product identifier of the originating Apple Print Product.

var themeIdentifier: String?

The product theme identifier of the originating Apple Print Product.


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.

class PHProject

A representation of a Photos app project extension.

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.

class PHProjectElement

The superclass for all element objects.

class PHProjectSection

A collection of content representing curated asset and text elements.

class PHProjectRegionOfInterest

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

class PHProjectChangeRequest

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

protocol PHProjectExtensionController

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

class PHCloudIdentifier

A cloud identifier for a Photos project extension.

struct PHProjectCategory

A representation of Photos project extension categories.