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

# finishProject(completionHandler:)

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

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

```
func finishProject() async
```

## Parameters

`completion`

A completion handler to execute before exiting the extension.

---

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)