<!--
{
  "availability" : [
    "iOS: 16.0.0 -",
    "iPadOS: 16.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "VisionKit",
  "identifier" : "/documentation/VisionKit/DataScannerViewControllerDelegate/dataScanner(_:didRemove:allItems:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "VisionKit"
    ],
    "preciseIdentifier" : "s:9VisionKit33DataScannerViewControllerDelegateP04dataD0_9didRemove8allItemsyAA0cdeF0C_SayAA14RecognizedItemOGAKtF"
  },
  "title" : "dataScanner(_:didRemove:allItems:)"
}
-->

# dataScanner(_:didRemove:allItems:)

Responds when the data scanner stops recognizing an item.

```
@MainActor func dataScanner(_ dataScanner: DataScannerViewController, didRemove removedItems: [RecognizedItem], allItems: [RecognizedItem])
```

## Parameters

`dataScanner`

The data scanner that recognizes the item.

`removedItems`

The items that the data scanner removes from the
[`recognizedItems`](/documentation/VisionKit/DataScannerViewController/recognizedItems) property.

`allItems`

The current items that the data scanner tracks. Text items
appear in the reading order of the language and region.

## Discussion

To identify an item in the `removedItems` and `allItems` parameters, use
the item’s `id` property.

---

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)