6

I implemented two Custom Intents with Sirikit in my iOS app. When I was developing them I had iOS 13.3 installed in my iphone and one of my intents has a Siri Dialog prompt asking for the value of one parameter. All the app is translated to english and spanish and the custom intent worked nicely in both languages.

When I updated my iphone to iOS 13.4.1 my custom intent started to have the following issues (I saw both issues depending on the installation/test/device):

  • Siri asking for the parameter value as if I wouldn't put any custom dialog with the standard phrase "What value do you want for param?" (more or less)
  • Siri asking the Siri dialog prompt in english and not in spanish even when the rest of the phrases and Siri responses of the rest of the Intent and the app are correctly translated into spanish. The only translation that is not working is the Siri Dialog prompt.

I find this issue very strange and annoying. I tried to recreate the translation files for Intent.intentdefinition: Intent.strings (Base), Intent.strings (English), Intent.strings (Spanish) and I even tried to recreate the whole Custom Intent definition and I'm still having the issue.

I also tried to change the iOS language and Siri language on my phone, restart, reinstall the app, intents, etc...

This is the Info.plist of my Sirikit extension:

<?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>CFBundleDevelopmentRegion</key>  
  <string>$(DEVELOPMENT_LANGUAGE)</string>  
  <key>CFBundleDisplayName</key>  
  <string>InventorySearchIntent</string>  
  <key>CFBundleExecutable</key>  
  <string>$(EXECUTABLE_NAME)</string>  
  <key>CFBundleIdentifier</key>  
  <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>  
  <key>CFBundleInfoDictionaryVersion</key>  
  <string>6.0</string>  
  <key>CFBundleName</key>  
  <string>$(PRODUCT_NAME)</string>  
  <key>CFBundlePackageType</key>  
  <string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>  
  <key>CFBundleShortVersionString</key>  
  <string>$(MARKETING_VERSION)</string>  
  <key>CFBundleVersion</key>  
  <string>$(CURRENT_PROJECT_VERSION)</string>  
  <key>NSExtension</key>  
  <dict>  
  <key>NSExtensionAttributes</key>  
  <dict>  
  <key>IntentsRestrictedWhileLocked</key>  
  <array/>  
  <key>IntentsRestrictedWhileProtectedDataUnavailable</key>  
  <array/>  
  <key>IntentsSupported</key>  
  <array>  
  <string>NumTotalItemsIntent</string>  
  <string>SearchItemIntent</string>  
  </array>  
  </dict>  
  <key>NSExtensionPointIdentifier</key>  
  <string>com.apple.intents-service</string>  
  <key>NSExtensionPrincipalClass</key>  
  <string>$(PRODUCT_MODULE_NAME).IntentHandler</string>  
  </dict>  
</dict>  
</plist>  

Any solution for this? Is it a bug from iOS 13.4? Siri integration is very important for the app that I'm developing and this is a blocker for me.

Thanks in advance!

Diego Navarro
  • 9,316
  • 3
  • 26
  • 33

3 Answers3

1

In my own experience, this issue is fixed in iOS 13.5 beta 4. I just tested it in an iPhone 6s Plus with Xcode 11.5 beta 2 (11N605f).

However, there are other issues still. For example, in Shortcuts, all operation strings in my test project are shown in English, not the localized language.

Also, INStringResolutionResult.confirmationRequired(with:) doesn't work as expected.

I have a function gets the words user says and looks them up in database then uses INStringResolutionResult.confirmationRequired(with:) to check with the user. SiriKit currently only uses the words the user says, not the result that I check with the user, which leads the final code crashes.

UPDATES

I just got the reply from Apple's bug report team. Here are the conclusions I make for now.

  1. When switching languages, Siri some times, if not all the times, has an issue of using the default sentences to replace the sentences that a developer provides.
  2. Installing Siri profile and reboot may fixed above issue on Siri of current setting. But if you change the language of Siri, the issue is still there.
  3. There were regressions on APIs of INStringResolutionResult. For single result, both open class func disambiguation(with stringsToDisambiguate: [String]) -> Self and open class func confirmationRequired(with stringToConfirm: String?) -> Self wouldn't work on iOS later than iOS 13.3. Siri used a placeholder called "name" instead of the actual value.
Community
  • 1
  • 1
Owen Zhao
  • 3,205
  • 1
  • 26
  • 43
  • 1
    I contacted to Apple Developer Technical Support and I recreated the bug in a separated project and they told me to file a bug report using Feedback Assistant. I can't test iOS 13.5 beta 4 because I use my main phone to test my app and I don't want to reinstall everything and use beta iOS for my daily usage. It seems is clearly a bug and I think I will have to wait until iOS 13.5 is available, which is really a shame since this is blocking my app release. – Diego Navarro May 13 '20 at 16:35
  • Confirmed. iOS 13.5 fixes the issue with the Siri dialog asking for the parameter although some strings are not completely translated when trying to add the Siri shortcut. – Diego Navarro May 20 '20 at 16:11
  • From my own test, SiriKit in iOS 13.5 doesn't work in real device at all. Siri in real device only uses the default words, not what the programmer provides, even in English. Siri in 13.5 simulator doesn't work at all. Siri in 13.3 simulator works fine. My iPhone is iPhone 6s Plus with the latest iOS 13.5. – Owen Zhao May 21 '20 at 01:47
  • In my case, it works ok with an iPhone 11 Pro (iOS 13.5). I don't know if your problem or use case is the same as mine. I think we have to be patient because they will need to fix it in later versions. BTW, check the intent category you're running in your .intentdefinition file. I also had some issues with that and category="Run" works for me but "Search" or "Find" fails – Diego Navarro May 22 '20 at 10:31
  • Thank you. Mine is in "Find". Here is my sample project you can have a test if you like. https://www.dropbox.com/sh/a55svrip3myb8rd/AADE2nFpvTNR9lkzLC4hT5uNa?dl=0 – Owen Zhao May 22 '20 at 11:40
  • Then you really should try to change that category and see what happens. – Diego Navarro May 22 '20 at 14:56
1

iOS 14 Update

I am still seeing the following behaviour (as reported by Owen Zhao) with iOS 14:

  • When switching languages, Siri some times, if not all the times, has an issue of using the default sentences to replace the sentences that a developer provides.

I observed that rebooting the iOS device after language change is (still) fixing the issue.

Alex
  • 91
  • 6
0
  1. Localize your intent definition file to all languages that your app supports
  2. Ensure that your Xcode project identifies localizations by the ISO 639-1 language identifier scheme (additional information on the schemes). Older Xcode projects may use a different language identification scheme and should be updated.
  3. If your app has not yet been localized, ensure that the selected Siri language in Settings matches the CFBundleDevelopmentRegion of your Xcode project, and the value of this key is in ISO 639-1 format

Hope this works for you

Jonah Legg
  • 121
  • 5
  • It is already translated to all supported languages and the Xcode project is just a few months old with the latest Xcode version (now 11.4.1). All the localisation was working properly until iOS 13.4.1. And it works with the exact same project and code with iOS 13.3 – Diego Navarro Apr 22 '20 at 19:28
  • Have you checked #3 yet because I had your same issue but the selected Siri language in Settings didn't match the CFBundleDevelopmentRegion – Jonah Legg Apr 22 '20 at 19:30
  • I don't understand #3. Does it mean that I can only have one language? My development language is English. I have Base, English, and Spanish translations. The Siri language on my phone is Spanish. – Diego Navarro Apr 23 '20 at 08:05
  • English translations work nice, the problem is with Spanish language. – Diego Navarro Apr 23 '20 at 08:13