<!--
{
  "availability" : [
    "iOS: 18.0.0 -",
    "iPadOS: 18.0.0 -",
    "macCatalyst: 18.0.0 -",
    "macOS: 15.0.0 -",
    "visionOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreSpotlight",
  "identifier" : "/documentation/CoreSpotlight/CSUserQuery/userEngaged(_:visibleSuggestions:interaction:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Core Spotlight",
      "CoreSpotlight"
    ],
    "preciseIdentifier" : "s:So11CSUserQueryC13CoreSpotlightE11userEngaged_18visibleSuggestions11interactionyAbCE10SuggestionV_SayAHGSo0A11InteractionVtF"
  },
  "title" : "userEngaged(_:visibleSuggestions:interaction:)"
}
-->

# userEngaged(_:visibleSuggestions:interaction:)

Notifies the system that someone engaged with a specific text
completion in your app’s interface.

```
func userEngaged(_ suggestion: CSUserQuery.Suggestion, visibleSuggestions: [CSUserQuery.Suggestion], interaction: CSUserQuery.UserInteractionKind)
```

## Parameters

`suggestion`

The suggestion that someone chose.

`visibleSuggestions`

The set of suggestions your app was displaying.

`interaction`

The type of interaction with the item. Use this
parameter to indicate whether the person selected the item or interacted with
it in another way.

## Discussion

When someone selects or interacts with a specific text completion suggestion
in your app’s UI, call this method to tell Spotlight about the interaction.
Reporting this type of engagement helps Spotlight deliver better suggestions
more quickly in future queries. It also improves the ranked results Spotlight
delivers to your app. The system keeps all information about these interactions on the current device.

---

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)