<!--
{
  "availability" : [
    "iOS: 27.0.0 -",
    "iPadOS: 27.0.0 -",
    "macOS: 27.0.0 -",
    "visionOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/View/photosSharedAlbumCreationSheet(isPresented:defaultTitle:defaultSharingPolicy:photoLibrary:onCompletion:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "SwiftUI",
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI4ViewP07_Photosb1_aB0E30photosSharedAlbumCreationSheet11isPresented12defaultTitle0L13SharingPolicy12photoLibrary12onCompletionQrAA7BindingVySbG_SSSgSo08PHSharedghnO0VSgSo07PHPhotoQ0Cy0dB00ugH6ResultVSgcSgtF"
  },
  "title" : "photosSharedAlbumCreationSheet(isPresented:defaultTitle:defaultSharingPolicy:photoLibrary:onCompletion:)"
}
-->

# photosSharedAlbumCreationSheet(isPresented:defaultTitle:defaultSharingPolicy:photoLibrary:onCompletion:)

Presents a view for allowing the user to create a new shared album.

```
nonisolated func photosSharedAlbumCreationSheet(isPresented: Binding<Bool>, defaultTitle: String? = nil, defaultSharingPolicy: PHSharedAlbumCreationSharingPolicy? = nil, photoLibrary: PHPhotoLibrary, onCompletion: ((PHSharedAlbumCreationResult?) -> Void)? = nil) -> some View
```

## Parameters

`isPresented`

The binding for whether the shared album creation view should be shown.

`defaultTitle`

The default title for the shared album. Useful for suggesting a relevant title to the user.

`defaultSharingPolicy`

The default sharing policy of the shared album. If `nil`, this defaults to `.private`.

`photoLibrary`

The photo library in which the shared album will be created.

`onCompletion`

The callback that will be invoked when shared album creation has succeeded or failed. On success, the result’s `albumIdentifier` and `albumURL` will be non-nil. On failure, the result’s `error` will be non-nil.

## Discussion> Remark:
> When creation is finished, `onCompletion` will be called before`isPresented` is set to `false`. If the user cancels creation, `isPresented` will be set to `false` and `onCompletion` will not be called.

---

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)