---
title: "beginProject(with:projectInfo:completion:)"
framework: photosui
role: symbol
role_heading: Instance Method
path: "photosui/phprojectextensioncontroller/beginproject(with:projectinfo:completion:)"
---

# beginProject(with:projectInfo:completion:)

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

## Declaration

```swift
func beginProject(with extensionContext: PHProjectExtensionContext, projectInfo: PHProjectInfo, completion: @escaping @Sendable ((any Error)?) -> Void)
```

```swift
func beginProject(with extensionContext: PHProjectExtensionContext, projectInfo: PHProjectInfo) async throws
```

## Parameters

- `extensionContext`: The extension context with access to the project assets.
- `projectInfo`: Information about the project the extension is called on.
- `completion`: A closure with code you provide that runs on completion.

## See Also

### Tracking the Project Extension Life Cycle

- [finishProject(completionHandler:)](photosui/phprojectextensioncontroller/finishproject(completionhandler:).md)
- [resumeProject(with:completion:)](photosui/phprojectextensioncontroller/resumeproject(with:completion:).md)
- [typeDescriptionDataSource(for:invalidator:)](photosui/phprojectextensioncontroller/typedescriptiondatasource(for:invalidator:).md)
