Instance Method


Registers the specified vocabulary strings with the user.


func setVocabularyStrings(_ vocabulary: NSOrderedSet, of type: INVocabularyStringType)



The vocabulary strings to associate with the specified type. Each NSString object should contain terms that are unique to your app and to the specific user. Sort the strings in descending order of importance. In other words, the first string should be the most important, followed by strings of decreasing importance. Each string must be no more than 1024 bytes.


The designated purpose for the strings in the vocabulary parameter. You must specify one of the designated types. You cannot specify custom types of strings. For a list of possible values, see INVocabularyStringType.


Use this method to register user-specific vocabulary terms of the specified type. You may register different sets of strings for each of the supported types, but you may register only one group of strings for each type. Calling this method again for a given type replaces the previously registered strings already assigned to that type.

Do not use this method to register terminology that is common to all users of your app. Use this method only to register terms that are specific to the current user. Common terminology should be included in the vocabulary property list file that you include with your Intents extension.

Calling this method is not a guarantee that Siri will use the terms you supply. If you specify more than just a few strings, Siri may ingest only the first few strings rather than the entire list. So always place the most important strings first in the ordered set. In addition, if any of the strings exceed the maximum size limit, Siri ignores them.

It is a programmer error to register terms that are not supported by any of your extension's intents.

See Also

Updating the User-Specific Vocabulary

func setVocabulary(NSOrderedSet, of: INVocabularyStringType)

Registers the specified vocabulary strings with the user.

enum INVocabularyStringType

Possible usages for a custom vocabulary term.

func removeAllVocabularyStrings()

Removes all user-specific vocabulary strings.