What is NSSuggestionItemResponse
Asked on 2024-07-30
1 search
NSSuggestionItemResponse is a new API introduced in macOS Sequoia that allows your app to provide custom suggestions as people type in a system-standard suggestions menu. This feature is part of the text entry suggestions in AppKit and works on any NSTextField, including subclasses like NSSearchField.
To get started, you need to set the suggestionsDelegate property on the text field. The delegate is asked for suggestions as text is typed and can respond with results both synchronously and asynchronously. It can also optionally customize the text completions on highlight and selection.
For more details, you can refer to the session What’s new in AppKit at the timestamp 17:06.

Support semantic search with Core Spotlight
Learn how to provide semantic search results in your app using Core Spotlight. Understand how to make your app’s content available in the user’s private, on-device index so people can search for items using natural language. We’ll also share how to optimize your app’s performance by scheduling indexing activities. To get the most out of this session, we recommend first checking out Core Spotlight documentation on the Apple Developer website.

What’s new in AppKit
Discover the latest advances in Mac app development. Get an overview of the new features in macOS Sequoia, and how to adopt them in your app. Explore new ways to integrate your existing code with SwiftUI. Learn about the improvements made to numerous AppKit controls, like toolbars, menus, text input, and more.

Enhanced suggestions for your journaling app
Find out how your journaling app can display journaling suggestions with richer content from the system. Explore new types of available content like state of mind data, reflection prompts, and support for third-party media content and motion-based activities.
