<!--
{
  "availability" : [
    "iOS: 26.0.0 -",
    "iPadOS: 26.0.0 -",
    "macCatalyst: 26.0.0 -",
    "macOS: 26.0.0 -",
    "visionOS: 26.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/DropSession/LocalSession-swift.struct/draggedItemIDs(for:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI11DropSessionV05LocalD0V14draggedItemIDs3forSayxGxm_tSHRzlF"
  },
  "title" : "draggedItemIDs(for:)"
}
-->

# draggedItemIDs(for:)

Provides an array of identifiers of the currently dragged items if available.

```
func draggedItemIDs<ItemID>(for type: ItemID.Type) -> [ItemID] where ItemID : Hashable
```

## Discussion

If drag started within the application, the dragged items have identifiers,
and SwiftUI has access to these identifiers, you can access them using this method.

Parameter type: The type of the identifiers.
Returns: The array with the identifiers of the dragged items if provided.
Returns an empty array if there are no dragged identifiers
of a given type.

---

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)