<!--
{
  "availability" : [
    "iOS: 26.0.0 - 27.0.0",
    "iPadOS: 26.0.0 - 27.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/View/postToPhotosSharedAlbumSheet(isPresented:items:photoLibrary:defaultAlbumIdentifier:completion:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "SwiftUI",
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI4ViewP07_Photosb1_aB0E06postToD16SharedAlbumSheet11isPresented5items12photoLibrary07defaultH10Identifier10completionQrAA7BindingVySbG_Say0dB014PHPickerResultVGSo07PHPhotoN0CSSSgys0T0Oyyts5Error_pGcSgtF::OverloadGroup"
  },
  "title" : "postToPhotosSharedAlbumSheet(isPresented:items:photoLibrary:defaultAlbumIdentifier:completion:)"
}
-->

# postToPhotosSharedAlbumSheet(isPresented:items:photoLibrary:defaultAlbumIdentifier:completion:)

Presents an “Add to Shared Album” sheet that allows the user to post the given items to a shared album.

```
nonisolated func postToPhotosSharedAlbumSheet(isPresented: Binding<Bool>, items: [PHPickerResult], photoLibrary: PHPhotoLibrary, defaultAlbumIdentifier: String? = nil, completion: ((Result<Void, any Error>) -> Void)? = nil) -> some View
```

## Parameters

`isPresented`

The binding to whether the sheet should be shown.

`items`

The items to be posted to the shared album.

`photoLibrary`

Library to choose from.

`defaultAlbumIdentifier`

Identifier for the shared album to be pre-selected. If none provided user can manually choose the shared album in UI.

`completion`

Called with the result on completion of the request.

---

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)