<!--
{
  "availability" : [
    "iOS: 16.0.0 -",
    "iPadOS: 16.0.0 -",
    "macCatalyst: 16.0.0 -",
    "macOS: 13.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "PhotoKit",
  "identifier" : "/documentation/PhotosUI/PHPickerViewController/deselectAssets(withIdentifiers:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "PhotosUI"
    ],
    "preciseIdentifier" : "c:objc(cs)PHPickerViewController(im)deselectAssetsWithIdentifiers:"
  },
  "title" : "deselectAssets(withIdentifiers:)"
}
-->

# deselectAssets(withIdentifiers:)

Deselects assets that are in a selected state.

```
func deselectAssets(withIdentifiers identifiers: [String])
```

## Parameters

`identifiers`

The list of identifiers to deselect.

## Discussion

This method ignores assets that are invalid or aren’t in a selected state, and if you don’t specify a library when calling [`init(photoLibrary:)`](/documentation/PhotosUI/PHPickerConfiguration-swift.struct/init(photoLibrary:)).

---

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)