An object for registering user-specific vocabulary that might be included in Siri requests.
- iOS 10.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.
Do not 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.
Do not use this class to register terms that are common to all users of your app. Vocabulary that is common to all users of your app should be included 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 is a programmer error to register terms that are not supported by any of your extension's intents.
Use the shared vocabulary object only in your iOS app. Do not try to register vocabulary from your Intents extension or Intents UI extension.