userEngaged(_:visibleSuggestions:interaction:)
Notifies the system that someone engaged with a specific text completion in your app’s interface.
Declaration
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.