我还添加了Siri使用说明,但我的应用程序未在此列表中列出。也许我错过了什么。请帮我解决一下这个。提前谢谢。
You can see the respected image here.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>ParameterVocabularies</key>
<array>
<dict>
<key>Parameter Names</key>
<array>
<string>INStartWorkoutIntent.workoutName</string>
</array>
<key>Parameter Vocabulary</key>
<array>
<dict>
<key>Vocabulary Item Identifire</key>
<string>step,wellness,sleep</string>
<key>Vocabulary Item Synonyms</key>
<array>
<dict>
<key>Vocabulary Item Phrase</key>
<string>Step Count</string>
<key>Vocabulary Item Examples</key>
<array>
<string>count my steps with Test</string>
<string>my wellness with Test</string>
</array>
</dict>
</array>
</dict>
</array>
</dict>
</array>
<key>IntentPhrases</key>
<array>
<dict>
<key>Intent Name</key>
<string>INStartWorkoutIntent</string>
<key>Intent Examples</key>
<array>
<string>siri start my step count</string>
<string>log my workout with Test</string>
</array>
</dict>
</array>
</dict>
</plist>
答案 0 :(得分:0)
您需要在项目中添加AppIntentVocabulary.plist文件并包含一些Intent示例。 Siri将向用户展示这些作为示例。
这个AppIntentVocabulary非常适合我(所有敏感数据都替换为占位符):
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IntentPhrases</key>
<array>
<dict>
<key>IntentName</key>
<string>INRequestRideIntent</string>
<key>IntentExamples</key>
<array>
<string>Book a ride with MyAppName.</string>
</array>
</dict>
</array>
<key>ParameterVocabularies</key>
<array>
<dict>
<key>ParameterNames</key>
<array>
<string>INRequestRideIntent.rideOptionName</string>
</array>
<key>ParameterVocabulary</key>
<array>
<string>Word</string>
<string>Word2</string>
<dict>
<key>VocabularyItemIdentifier</key>
<string>Word2</string>
<key>VocabularyItemSynonyms</key>
<array>
<dict>
<key>VocabularyItemPhrase</key>
<string>Word2</string>
<key>VocabularyItemExamples</key>
<array>
<string>Get me a Word2 with MyAppName</string>
<string>Book a Word2 with MyAppName</string>
</array>
</dict>
</array>
</dict>
<dict>
<key>VocabularyItemIdentifier</key>
<string>Word1</string>
<key>VocabularyItemSynonyms</key>
<array>
<dict>
<key>VocabularyItemPhrase</key>
<string>Word1</string>
<key>VocabularyItemExamples</key>
<array>
<string>Get me a Word1 with MyAppName</string>
<string>Book a Word1 with MyAppName</string>
</array>
</dict>
<dict>
<key>VocabularyItemPhrase</key>
<string>Word3</string>
<key>VocabularyItemExamples</key>
<array>
<string>Get me a Word3 with MyAppName</string>
<string>Book a Word3 with MyAppName</string>
</array>
</dict>
<dict>
<key>VocabularyItemPhrase</key>
<string>Word2</string>
<key>VocabularyItemExamples</key>
<array>
<string>Book a Word2 with MyAppName.</string>
<string>Get me a Word2 with MyAppName</string>
</array>
</dict>
</array>
</dict>
</array>
</dict>
</array>
</dict>
</plist>