One Logo Pool Ball
AppIntents · IOS API REFERENCE

IndexedEntity

protocol · iOS 18.0+ · SDK 27.1

protocol IndexedEntity : AppEntity

An interface that allows you to include an entity in your app’s Spotlight index. Adopt this protocol in app entities you want to include in your app’s Spotlight index. Adding entities to Spotlight makes them discoverable by Apple Intelligence, and also serves as the first step in letting Spotlight launch your app and display items that appear in search results. Use the properties of this protocol to configure additional Spotlight metadata to accompany your app entity in the index. For more information about adding entities to your app’s Spotlight index, see <doc:making-app-entities-available-in-spotlight>.

Members (3)

get · iOS 18.0+

attributeSet

Swift declaration
var attributeSet: CSSearchableItemAttributeSet { get }

A custom attribute set that you include with your entity to improve search accuracy. Use this property to include additional metadata in the index for your app entity. This property augments the set of declared properties in your entity that have an indexing key. The default implementation of this property provides an attribute set with the title, subtitle, and image values from the entity’s display representation.

get · iOS 18.4+

hideInSpotlight

Swift declaration
var hideInSpotlight: Bool { get }

A Boolean value that indicates whether Spotlight prevents the inclusion of the entity in the index. When the value of this property is `true`, Spotlight doesn’t include the entity in search results. The default value of this property is `false`.

get · iOS 18.0+

defaultAttributeSet

Swift declaration
var defaultAttributeSet: CSSearchableItemAttributeSet { get }

The default set of attributes to include with your app entity in the Spotlight index. This property contains an attribute set with the title, subtitle, and image values from the entity’s display representaiton. Provide any custom attributes for your entity using the ``attributeSet`` property instead of this one.

Skipped declarations

No declarations were skipped in this snapshot.

All AppIntents types →