An object for registering user-specific vocabulary that Siri requests might include.
- iOS 10.0+
- Mac Catalyst 13.0+
- watchOS 6.0+
INVocabulary object lets you augment your app’s global vocabulary with terms that are both unique to your app and to the current user of your app. Registering custom terms provides Siri with hints it needs to apply those terms appropriately to the corresponding intent objects. You may register custom terms only for specific types of content, including users of your app, custom workout names, or custom tags applied to a photo.
Some tips for specifying custom vocabulary include:
Be selective about the terms that you register for users. Include words and phrases only when their use in your app by the current user might differ from everyday usage.
Order terms from most important to least important. If you register a large number of entries, Siri may ingest only the ones at the beginning of your list.
Don’t register contact names that you retrieved from the user’s Contacts database. Register contacts only if your app manages contact information separately from the system databases.
Don’t use this class to register terms that are common to all users of your app. Include vocabulary that’s common to all users of your app in your app’s global vocabulary file. For information about specifying your app’s global vocabulary file, see SiriKit Programming Guide.
Your Intents extension must support at least one intent that uses the registered terms. It’s a programmer error to register terms that aren’t supported by any of your extension’s intents.
Use the shared vocabulary object only in your iOS app. Don’t try to register vocabulary from your Intents extension or Intents UI extension.