---
title: "dataScanner(_:didUpdate:allItems:)"
framework: visionkit
role: symbol
role_heading: Instance Method
path: "visionkit/datascannerviewcontrollerdelegate/datascanner(_:didupdate:allitems:)"
---

# dataScanner(_:didUpdate:allItems:)

Responds when the data scanner updates the geometry of an item it recognizes.

## Declaration

```swift
@MainActor func dataScanner(_ dataScanner: DataScannerViewController, didUpdate updatedItems: [RecognizedItem], allItems: [RecognizedItem])
```

## Parameters

- `dataScanner`: The data scanner that recognizes the item.
- `updatedItems`: The items with geometry that the data scanner changes.
- `allItems`: The current items that the data scanner tracks. Text items appear in the reading order of the language and region.

## Mentioned in

Scanning data with the camera

## Discussion

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

## See Also

### Customizing highlighting

- [dataScanner(_:didAdd:allItems:)](visionkit/datascannerviewcontrollerdelegate/datascanner(_:didadd:allitems:).md)
- [dataScanner(_:didRemove:allItems:)](visionkit/datascannerviewcontrollerdelegate/datascanner(_:didremove:allitems:).md)
