---
title: "photosSharedAlbumPostingSheet(isPresented:items:defaultAlbumIdentifier:photoLibrary:completion:)"
framework: swiftui
role: symbol
role_heading: Instance Method
path: "swiftui/view/photossharedalbumpostingsheet(ispresented:items:defaultalbumidentifier:photolibrary:completion:)"
---

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

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

## Declaration

```swift
nonisolated func photosSharedAlbumPostingSheet(isPresented: Binding<Bool>, items: [PHPickerResult], defaultAlbumIdentifier: String? = nil, photoLibrary: PHPhotoLibrary, completion: ((Result<String, 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.
- `defaultAlbumIdentifier`: Identifier for the shared album to be pre-selected. If none provided user can manually choose the shared album in UI.
- `photoLibrary`: Library to choose from.
- `completion`: Called with the result on completion of the request.

## See Also

### Selecting photos

- [PhotosPicker](photosui/photospicker.md)
- [photosPicker(isPresented:selection:matching:preferredItemEncoding:)](swiftui/view/photospicker(ispresented:selection:matching:preferreditemencoding:).md)
- [photosPicker(isPresented:selection:matching:preferredItemEncoding:photoLibrary:)](swiftui/view/photospicker(ispresented:selection:matching:preferreditemencoding:photolibrary:).md)
- [photosPicker(isPresented:selection:maxSelectionCount:selectionBehavior:matching:preferredItemEncoding:)](swiftui/view/photospicker(ispresented:selection:maxselectioncount:selectionbehavior:matching:preferreditemencoding:).md)
- [photosPicker(isPresented:selection:maxSelectionCount:selectionBehavior:matching:preferredItemEncoding:photoLibrary:)](swiftui/view/photospicker(ispresented:selection:maxselectioncount:selectionbehavior:matching:preferreditemencoding:photolibrary:).md)
- [photosPickerAccessoryVisibility(_:edges:)](swiftui/view/photospickeraccessoryvisibility(_:edges:).md)
- [photosPickerDisabledCapabilities(_:)](swiftui/view/photospickerdisabledcapabilities(_:).md)
- [photosPickerSearchText(_:)](swiftui/view/photospickersearchtext(_:).md)
- [photosPickerStyle(_:)](swiftui/view/photospickerstyle(_:).md)
- [photosPickerMetadataOptions(_:)](swiftui/view/photospickermetadataoptions(_:).md)
- [photosSharedAlbumCreationSheet(isPresented:defaultTitle:defaultSharingPolicy:photoLibrary:onCompletion:)](swiftui/view/photossharedalbumcreationsheet(ispresented:defaulttitle:defaultsharingpolicy:photolibrary:oncompletion:).md)
- [photosSharedAlbumCustomizationSheet(isPresented:albumIdentifier:photoLibrary:onCompletion:)](swiftui/view/photossharedalbumcustomizationsheet(ispresented:albumidentifier:photolibrary:oncompletion:).md)
