<!--
{
  "availability" : [
    "iOS: 27.0.0 -",
    "iPadOS: 27.0.0 -",
    "macCatalyst: -",
    "macOS: 27.0.0 -",
    "tvOS: 27.0.0 -",
    "visionOS: 27.0.0 -",
    "watchOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppIntents",
  "identifier" : "/documentation/AppIntents/RelevantEntities/updateEntities(_:for:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "App Intents"
    ],
    "preciseIdentifier" : "s:10AppIntents16RelevantEntitiesV06updateD0_3forySayAA0A6Entity_pG_AA0aG7ContextVtYaKF"
  },
  "title" : "updateEntities(_:for:)"
}
-->

# updateEntities(_:for:)

Donates suggested entities for a single context.

```
func updateEntities(_ entities: [any AppEntity], for context: AppEntityContext) async throws
```

## Parameters

`entities`

The entities to donate.

`context`

The context with which to associate the donated entities.

## Discussion

Replaces any previously donated entities associated with the given context.

> Throws: An error if the donation fails.

---

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)