Handle requests for your app’s services from users using Siri or Maps.

SiriKit Documentation

Posts under SiriKit tag

98 results found
Sort by:
Post not yet marked as solved
22 Views

How to add SiriKit to macOS app

Hi, I haven't been able to add some basic SiriKit actions to my macOS app in macOS Monterey. To test this out, I created a new project, made it a macOS app with Storyboard. Then I added an intents definition file, and added a basic intent, with no inputs/outputs. I added the intent name to "Supported Intents" in the target "General" configuration. Now when I build and run the app, the shortcut doesn't show up in the Apple Shortcuts app. I've tried looking for the "Siri" capability in "Signing & Capabilities" and it's not listed there (compared to a new iOS app where it would be). I'm not sure what I'm missing here. Would love some help. I'm using Xcode 13.1 on macOS Monterey RC.
Asked
by zulfishah.
Last updated
.
Post not yet marked as solved
15 Views

Is there a way to build a "Get Details" intent?

There is a common pattern used by Apple applications to get the properties of a custom type. "Get Details of Calendar Events" or "Get Details of Contacts" are examples of what I'm talking about. It seems like these actions return different response types depending on the property that gets selected as the "detail" to get. I can't figure out how to do this in the Intent definition in Xcode. Is this is a limitation of the current Intent definition file or is there some trick to implementing this pattern?
Asked Last updated
.
Post not yet marked as solved
44 Views

Not able to see iOS 15 avatar only when I release my app

I’ve faced the following issue, and shortly the notification picture does not show up with iOS 15 under some conditions. It seems that during INImage processing for INSendMessageIntent, it tries to generate an internal URL with intents-remote-image-proxy if the given source is not a remote URL. But proper URL doesn’t seem to be generated in some cases and the expected image doesn’t show up.  Here the weirdest part for me is that the problem only happens when I release my app (for example to the TestFlight), and with the XCode debug build my implementation works perfectly. [This is the error trace when I release the app] default 16:29:26.149259+0900 NotificationExt Persisting INImage for Intent Type 'INSendMessageIntent': sender image _uri: (null) default 16:29:26.149777+0900 NotificationExt Persisting INImage for Intent Type 'INSendMessageIntent': url created from image's _identifier default 16:29:26.149823+0900 NotificationExt Persisting INImage for Intent Type 'INSendMessageIntent': contentURL scheme does not match scheme 'intents-remote-image-proxy'. Attempting to get a corresponding url with 'intents-remote-image-proxy' scheme. contentURL: 'B4BBA163-2F98-AFCC-8A8D-1178AC8399B5' default 16:29:26.149869+0900 NotificationExt Persisting INImage for Intent Type 'INSendMessageIntent': Getting proxied image synchronously for content url 'B4BBA163-2F98-AFCC-8A8D-1178AC8399B5'. *** error 16:29:26.150077+0900 NotificationExt -[INImageServiceConnection synchronousServiceProxyWithErrorHandler:]_block_invoke Error (from connection <private>; pid: 0) when using image service: Error Domain=NSCocoaErrorDomain Code=4099 UserInfo={NSDebugDescription=<private>} *** error 16:29:26.150238+0900 NotificationExt Persisting INImage for Intent Type 'INSendMessageIntent': Error getting proxied image synchronously for content url 'B4BBA163-2F98-AFCC-8A8D-1178AC8399B5' error: Couldn’t communicate with a helper application. default 16:29:26.150280+0900 NotificationExt Persisting INImage for Intent Type 'INSendMessageIntent': Final contentURL 'B4BBA163-2F98-AFCC-8A8D-1178AC8399B5' to persist. Finished in: 0.000854 seconds With XCode debug build, it works perfectly with generating the proper URL with 'intents-remote-image-proxy' scheme. [This is the trace of the successful case with XCode debug build] default 18:37:38.366065+0900 NotificationExt Persisting INImage for Intent Type 'INSendMessageIntent': sender image _uri: (null) default 18:37:38.366822+0900 NotificationExt Persisting INImage for Intent Type 'INSendMessageIntent': url created from image's _identifier default 18:37:38.366879+0900 NotificationExt Persisting INImage for Intent Type 'INSendMessageIntent': contentURL scheme does not match scheme 'intents-remote-image-proxy'. Attempting to get a corresponding url with 'intents-remote-image-proxy' scheme. contentURL: 'F9EFABF4-3A8F-174A-65E3-BD5B2EBEB2AF' default 18:37:38.366920+0900 NotificationExt Persisting INImage for Intent Type 'INSendMessageIntent': Getting proxied image synchronously for content url 'F9EFABF4-3A8F-174A-65E3-BD5B2EBEB2AF'. default 18:37:38.367166+0900 NotificationExt Persisting INImage for Intent Type 'INSendMessageIntent': Final contentURL 'intents-remote-image-proxy:?proxyIdentifier=F9EFABF4-3A8F-174A-65E3-BD5B2EBEB2AF.png&storageServiceIdentifier=com.apple.Intents.INImageServiceConnection' to persist. Finished in: 0.000929 seconds Here is the part of my code snippet. let friendImg = INImage(imageData: img.jpegData(compressionQuality: 0.1)!)         let senderPerson = INPerson(             personHandle: INPersonHandle(value: nil, type: .unknown),             nameComponents: nil,             displayName: “test”,             image: friendImg,             contactIdentifier: nil,             customIdentifier: nil,             isMe: false,             suggestionType: .none         )         let intent = INSendMessageIntent(             recipients: nil,             outgoingMessageType: .outgoingMessageText,             content: nil,             speakableGroupName: INSpeakableString(spokenPhrase: “test”),             conversationIdentifier: nil,             serviceName: nil,             sender: senderPerson,             attachments: nil         )                  intent.setImage(friendImg, forParameterNamed: \.sender)                  let interaction = INInteraction(intent: intent, response: nil)         interaction.direction = .incoming         interaction.donate(completion: nil)                 do {                 content = try content.updating(from: intent) as! UNMutableNotificationContent             } catch {                 //…             } } Plus, I’ve added NSExtension → NSExtensionAttributes (dictionary) → IntentsSupported (array) → INSendMessageIntent (string) in Notification Service Extension's Info.plist I’ve Enabled the Communication Notifications capability on my main app target Any Idea on this issue? Is there anything suspected?
Asked
by montre.
Last updated
.
Post not yet marked as solved
64 Views

IntentHandler Not Being Called

I want to use Siri to perform a repetitive task in my app that inputs variable parameters, thus accelerating the input of that data. I have implemented a couple custom intents for background execution with the use of an intentDefinition file and implemented an IntentsExtension and associated plist to enable those custom intents. I can successfully donate an interaction that iOS matches with the supported suggestions in the intentsDefinition file that causes a Siri Suggestion to be displayed in Siri Search (or on the lock screen when enabled): CreatePartsListIntent* createPartsListIntent = [[CreatePartsListIntent alloc] init];     createPartsListIntent.projectName = intentData.projectName;     createPartsListIntent.quantity = intentData.quantity; INInteraction* interaction = [[INInteraction alloc] initWithIntent:createPartsListIntent response:nil];     [interaction donateInteractionWithCompletion:^(NSError * _Nullable error) {         if(!error) {             NSLog(@"CreatePartsList donation success");         }else {             NSLog(@"CreatePartsList donation fail %@",error.localizedDescription);         }     }]; I can then tap on this suggestion and it takes me to my appDelegate to process the interaction within the app - (id)application:(UIApplication *)application handlerForIntent:(INIntent *)intent { // This method is called when I tap on the Siri suggestion } But I want to process the interaction in the background using voice commands. When I speak the the command of the interaction I donated, the IntentHandler is never called. I cannot figure out what I need to do to get the IntentHandler to be called. According to the WWDC18 Intro to Siri Shortcuts, I should be able to invoke a dialog with Siri, which is my goal. Am I off track. Why isn't the IntentHandler being called? What should trigger it to be called?
Asked
by jeffb6688.
Last updated
.
Post not yet marked as solved
50 Views

Can Sirikit be used to send a message via my own messaging app

Assuming I have a messaging app called "ExampleMessenger" with many users (e.g. Jack) who also have the app installed I would like to tell my iPhone, via Sirikit (or any other way) something like the following: "Send ExampleMessenger a message telling Jack that I am back in the office" Can Sirikit be used to send this message? If so, where is the message parsed into "Jack" and "I am back in the office"? In the Sirikit Intents code? Or in the app itself via a separate function?
Asked
by david_eye.
Last updated
.
Post not yet marked as solved
50 Views

NSOSStatusErrorDomain Code=-54

2021-10-15 12:26:06.427879+0800 CodeNotificationExtension[17524:630750] [default] LaunchServices: store (null) or url (null) was nil: Error Domain=NSOSStatusErrorDomain Code=-54 "process may not map database" UserInfo={NSDebugDescription=process may not map database, _LSLine=264, _LSFunction=-[_LSDReadClient getServerStoreWithCompletionHandler:]} 2021-10-15 12:26:06.428337+0800 CodeNotificationExtension[17524:630750] [default] Attempt to map database failed: permission was denied. This attempt will not be retried. 2021-10-15 12:26:06.428386+0800 CodeNotificationExtension[17524:630750] [db] Failed to initialize client context with error Error Domain=NSOSStatusErrorDomain Code=-54 "process may not map database" UserInfo={NSDebugDescription=process may not map database, _LSLine=264, _LSFunction=-[_LSDReadClient getServerStoreWithCompletionHandler:]} 2021-10-15 12:26:06.428445+0800 CodeNotificationExtension[17524:630750] [Intents] +[INAppInfo appInfoWithAppProxy:] Unable to create app info with application record: Error Domain=NSOSStatusErrorDomain Code=-54 "process may not map database" UserInfo={NSDebugDescription=process may not map database, _LSLine=264, _LSFunction=-[_LSDReadClient getServerStoreWithCompletionHandler:]}
Asked Last updated
.
Post not yet marked as solved
83 Views

donateInteractionWithCompletion crashes with 'NSUnknownKeyException'

I am attempting to donate an Interaction for a custom intent to create a Siri Shortcut. This is resulting in an execution error as follows: . . . *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<__NSCFString 0x2837703c0> valueForUndefinedKey:]: this class is not key value coding-compliant for the key pronunciationHint.' terminating with uncaught exception of type NSException This error occurs with the invocation of the following code block: `CreatePartsListIntent* createPartsListIntent = [[CreatePartsListIntent alloc] init];          createPartsListIntent.nameOfProject = intentData.nameOfProject;     createPartsListIntent.quantity = intentData.quantity;     INInteraction* interaction = [[INInteraction alloc] initWithIntent:createPartsListIntent response:nil];     [interaction donateInteractionWithCompletion:^(NSError * _Nullable error) {         if(!error) {             NSLog(@"CreatePartsList donation success");         }else {             NSLog(@"CreatePartsList donation fail %@",error.localizedDescription);         }     }];` I did a search for pronunciationHint. I found this in my intents.intentsDefinition file. It is a hidden parameter, but can be found when you open the file as propertyList. It is at the end of the file under INTypes. Below is a screenshot of the INTypes content found at the end of the intents.intentsDefinition file. If I delete Item 2 and Item 3 and delete the DerivedData, I still get the same NSException error, so I don't know where it is finding pronunciationHint and why it even cares that it is there. I am not even sure why the pronunciationHint parameter is being created. An excerpt of my intentDefinition file is shown below where it is showing the parameter TYPE that I created called Project. The auto creation of pronunciationHint is apparently related to the creation of this Project TYPE: Any ideas on how I can get by this error?
Asked
by jeffb6688.
Last updated
.
Post not yet marked as solved
40 Views

Siri Custom intent not resolving for duration parameters

I just noticed that siri custom intents are not resolving correctly for DURATION type parameters. Siri keeps providing the default value even after the user speaks. This happens on the new IOS 15 devices. See my code snippet     guard let duration = intent.parkingTime else{       completion(INTimeIntervalResolutionResult.needsValue())       return     }      /* Siri keeps returning 0 even if the user says 100 */     if(intent.parkingTime?.doubleValue == 0){       completion(INTimeIntervalResolutionResult.needsValue())       return     }     print("PARKING TIME \(duration.doubleValue)")           completion(INTimeIntervalResolutionResult.success(with: TimeInterval(duration.doubleValue)))   }
Asked
by babafresh.
Last updated
.
Post not yet marked as solved
377 Views

How to set Siri Voice in AVSpeechSynthesizer

I would like to have access to Siri Voice in AVSpeechSynthesizer to read text in our applications. I checked that it can already be accessed in Voice Over but not in Speech. I don't know if it can already be done in iOS 15. I need your help. Please.
Asked Last updated
.
Post not yet marked as solved
428 Views

watchOS: Siri Shortcut works within Shortcuts app, but not when activated by voice

My app has a Siri Shortcut that works fine when I execute it from the Shortcuts app on my watch, but if I try to activate it by voice, Siri says: "Sorry, something's wrong. Please try again." and then a second later says "We've had a problem. Please try again." I'm currently on watchOS 8 beta 6. I last tested this in early July with beta 2 or beta 3 and it was working at that time. I haven't made any changes to the intent extension since then. The shortcut activates fine by voice on my phone, running iOS 15 beta 6. I'm also able to execute other Shortcuts by voice on my watch. Has anyone else run into this before? Is there a way to debug the intent extension on the watch, so I can see if any of my intent handler code is even being called?
Asked
by jasonmarr.
Last updated
.
Post not yet marked as solved
881 Views

UIPasteboard.general no longer accessible from INExtension?

Hello everyone! I have this code in my INExtension: UIPasteboard.general.items.removeAll() Up through iOS 14.5, this worked correctly. However, in 14.5.1 and 14.6 beta 2, the following error message appears in the console, and the system pasteboard remains unchanged. Could not save pasteboard named com.apple.UIKit.pboard.general. Error: Error Domain=PBErrorDomain Code=11 "The pasteboard name com.apple.UIKit.pboard.general is not valid." UserInfo={NSLocalizedDescription=The pasteboard name com.apple.UIKit.pboard.general is not valid.} I filed FB9098625. Is anyone else having this issue?
Asked
by barnard-b.
Last updated
.
Post not yet marked as solved
125 Views

Siri Custom Intent as a library

Hello, is there a way to create an iOS library (potentially a Cocoa Pod or a Swift Package) with a SiriKit custom intent to be used as a way to enhance any application with that library installed?
Asked
by pampanet.
Last updated
.
Post not yet marked as solved
957 Views

ITMS-90626: Invalid Siri Support

Hello, i got this mail after upload my binary. /* Dear Developer, We identified one or more issues with a recent delivery for your app. Your delivery was successful, but you may wish to correct the following issues in your next delivery: ITMS-90626: Invalid Siri Support - Localized title for custom intent: 'Configuration' not found for locale: pl ITMS-90626: Invalid Siri Support - Localized title for custom intent: 'Configuration' not found for locale: es ITMS-90626: Invalid Siri Support - Localized title for custom intent: 'Configuration' not found for locale: da ITMS-90626: Invalid Siri Support - Localized title for custom intent: 'Configuration' not found for locale: ru ITMS-90626: Invalid Siri Support - Localized title for custom intent: 'Configuration' not found for locale: tr ITMS-90626: Invalid Siri Support - Localized title for custom intent: 'Configuration' not found for locale: el ITMS-90626: Invalid Siri Support - Localized title for custom intent: 'Configuration' not found for locale: nl ITMS-90626: Invalid Siri Support - Localized description for custom intent: 'Configuration' not found for locale: en ITMS-90626: Invalid Siri Support - Localized title for custom intent: 'Configuration' not found for locale: fr ITMS-90626: Invalid Siri Support - Localized title for custom intent: 'Configuration' not found for locale: nb ITMS-90626: Invalid Siri Support - Localized title for custom intent: 'Configuration' not found for locale: pt ITMS-90626: Invalid Siri Support - Localized title for custom intent: 'Configuration' not found for locale: sv ITMS-90626: Invalid Siri Support - Localized title for custom intent: 'Configuration' not found for locale: de ITMS-90626: Invalid Siri Support - Localized title for custom intent: 'Configuration' not found for locale: cs ITMS-90626: Invalid Siri Support - Localized title for custom intent: 'Configuration' not found for locale: it After you’ve corrected the issues, you can upload a new binary to App Store Connect. Best regards, The App Store Team / My App SiriKit Intent has only de and en localization files. The en and de localization strings are fully filled. What's the problem ???
Asked
by JBleyel.
Last updated
.
Post not yet marked as solved
436 Views

Intent definition in framework causing warning about intents implemented in two places

Have an app which has an intent definition defined in a framework. I understand that I have to add it to the project, but am seeing this warning message in Xcode when I run the app. The intents do seem to be working properly, however. iOS 14 and Xcode 12.5: objc[15464]: Class IntentSampleClassResolutionResult is implemented in both /private/var/containers/Bundle/Application/UUID/APPNAME.app/Frameworks/FRAMEWORKNAME.framework/Class (0x10917c2f8) and /private/var/containers/Bundle/Application/UUID/APPNAME.app/APPNAME (0x1028c1620). One of the two will be used. Which one is undefined. If I remove the intent definition file from my compile sources build settings, those warning messages disappear, but when I run the shortcut action, I get this warning in the console: 2021-06-12 21:07:54.234798-0700 APPNAME[15473:7317463] [Intents] -[INIntentResponse init] App proxy <<LSApplicationProxy: 0x127acaac0> com.company.appname file:///private/var/containers/Bundle/Application/UUID/APPNAME.app/ <com.company.appname :0>> doesn't contain intent SampleIntent, falling back to current bundle Any thoughts on how to suppress both of these warnings?
Asked Last updated
.
Post not yet marked as solved
193 Views

Siri related App Store submission warning

Getting the following warning on submission: ITMS-90626: Invalid Siri Support - Localized title for custom intent: '---' not found for locale: ... We get a similar warning for Localized description: : Invalid Siri Support - Localized description for custom intent: '---' not found for locale: ... Binary is accepted but would like to stop the warning. This is an intent used for the dynamic configuration of widgets. It is its own Siri extension target which contains the intent definition file. The intent definition is localized correctly (the intent presents one user facing string on the back of the widget that appears correctly in different locales). In the widget case, the title and description are never visible to the user. That's more for other uses of intents, like Shortcuts. "Account" is the user-facing string and it localizes correctly. I assume the title and description strings the warning mentions are the ones listed in the intent definition file (which are also localized). Thanks for any help!
Asked
by jhowlin.
Last updated
.