Siri custom intent and watchOS

Hi there,


We're working on a companion watchOS app for our main Application. The main app has already Siri Extension support and it works quite well: we are able to disambiguate our requests and let the INIntent open the main app once we've a correctly identified request.


We saw that watchOS also has support for Siri and Siri extensions in a stand-alone way. Our idea was to port most of the work done with iOS onto watchOS.


- Let's assume that the working iOS siri extension is called: SiriExtension. It handles quite well the siri interaction from the iPhone and it allows to open our main app into the specified task and/or do some work in the background. No issues here.


- Let's assume, also, that the watchOS siri extension we are working on is called: SiriWatchExtension. It should replicate the work done by its counterpart on iOS, but on watchOS and without a direct interaction with the iOS device: just like a stand-alone app.


What's unclear to us is how watchOS and Siri extensions works in respect to the counter part on iOS. Specifically:


- We all know that, if we exclude some specific special apps, the main interaction with Siri is done with INIntents donations and Shortcut (pretty much like SoupChef example).


- We couldn't see a clear way to add Shortcuts from the watchOS app. Seems that the Shortcuts from iOS are "magically" available also on watchOS, but that is somewhat "unidirectional".


- The shortcut that we invoke from the watchOS is triggering the IntentHandler from iOS, not the one we built into watchOS. Is this an intended behaviour? Are we missing something?


- Is there a way to donate an intent from watchOS to Shortcut and let this intent trigger just only when we're talking with our watch device?


- Also, is there a way to complete an action into the watch app other then the iOS app?



Many thanks for the patience, and sorry again for the very long post.

--

c.

I'm also finding an answer for this, but it turns out that without a companion iOS app, we can't add custom intent in the watch app.

To make handle performed on the watch, there should be a sirikit target added to the watchkit app as well. In the handler file properties, it should be targeted to the both - ios and watchkit app's sirikit targets.

When shortcut triggered on the watch, it checks - is there any intent file on the watchkit app's side. If yes, it checks - are there handler files accordingly to the intents from the intent file. When and if handler file had been found, system checks if the handler file is also targeted to the watchkit app's sirikit target. And there are should not be any intent /action especially for a watch. If something should work on the watch, it should also work on the ios device. The ios device can have something, that works only in the ios, but the watchkit intent always should have a pair for the ios.

Myself, i'm trying to find a way, how to work with watchconnectivity within sirikit. As i would like to make my app to perform some stuff from the watch app, and i don't want my app on the ios would be running for that. If someone knows about that, would be really nice to hear about it. Thanks.

Siri custom intent and watchOS
 
 
Q