---
title: "sharedAlbumPostingViewController(_:didCompleteWithError:)"
framework: photosui
role: symbol
role_heading: Instance Method
path: "photosui/phsharedalbumpostingviewcontroller/delegate-swift.protocol/sharedalbumpostingviewcontroller(_:didcompletewitherror:)"
---

# sharedAlbumPostingViewController(_:didCompleteWithError:)

## Declaration

```swift
func sharedAlbumPostingViewController(_ postingViewController: PHSharedAlbumPostingViewController, didCompleteWithError error: (any Error)?)
```

## Discussion

Discussion Called when asset posting has completed. error will be nil if asset posting was successful and non-nil if it was unsuccessful. The view controller won’t be dismissed automatically when this method is called.
