<!--
{
  "availability" : [
    "iOS: 27.3.0 -",
    "iPadOS: 27.3.0 -",
    "macOS: 27.3.0 -",
    "visionOS: 27.3.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/View/photosPickerContainerIdentifier(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "SwiftUI",
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI4ViewP07_Photosb1_aB0E31photosPickerContainerIdentifieryQrSSSgF"
  },
  "title" : "photosPickerContainerIdentifier(_:)"
}
-->

# photosPickerContainerIdentifier(_:)

Limits the Photos picker to only show items in the specified container.

```
nonisolated func photosPickerContainerIdentifier(_ containerIdentifier: String?) -> some View
```

## Parameters

`containerIdentifier`

The local identifier of the container. Usually it’s the local identifier of an asset collection. An identifier that doesn’t resolve is treated as `nil`.

## Return Value

A Photos picker only showing items in the specified container.

---

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)