---
title: "finishProject(completionHandler:)"
framework: photosui
role: symbol
role_heading: Instance Method
path: "photosui/phprojectextensioncontroller/finishproject(completionhandler:)"
---

# finishProject(completionHandler:)

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

## Declaration

```swift
func finishProject(completionHandler completion: @escaping @Sendable () -> Void)
```

```swift
func finishProject() async
```

## Parameters

- `completion`: A completion handler to execute before exiting the extension.

## See Also

### Tracking the Project Extension Life Cycle

- [beginProject(with:projectInfo:completion:)](photosui/phprojectextensioncontroller/beginproject(with:projectinfo:completion:).md)
- [resumeProject(with:completion:)](photosui/phprojectextensioncontroller/resumeproject(with:completion:).md)
- [typeDescriptionDataSource(for:invalidator:)](photosui/phprojectextensioncontroller/typedescriptiondatasource(for:invalidator:).md)
