Are voice shortcuts for custom SiriKit Intents supported on watchOS? - ios

I’m trying to get a voice shortcut for a custom Siri Intent working as part of an Apple Watch app, but I’m not sure whether that’s possible. Has anyone had success with this or know if it’s supported?
There isn't much code to share in this case, since most of the code is auto-generated by Xcode, but here’s a quick overview of how I have everything set up.
I created a custom Intent with a .intentdefiniton file and separate Intents Extension targets for my iOS app and watchOS app to handle the Intent.
I set up and donate the shortcuts at the appropriate time. I included an INUIAddVoiceShortcutButton in my app so a user can easily add or edit a phrase for the shortcut.
Everything works fine on an iPhone: the shortcut shows up at relevant times throughout iOS, and the Intents Extension in my iOS app handles the shortcut when I say the invocation phrase to Siri.
Since 20% of my app’s users use the Apple Watch app, I want to provide a congruent experience on watchOS. The donated shortcut shows up on the Siri watch face, as expected. I trigger the shortcut from the Siri watch face, and is handled by the Intents Extension that's part of my watchOS app.
When I say the intent’s invocation phrase to my Apple Watch (Series 3 GPS-only), however, it doesn’t work. Siri says:
Checking with the app...
Then a few seconds later:
I do not recognize that command.
I’ve tried this with a separate Intents Extension for my watchOS app, and without. I get the same results in both situations. It works on the simulator, but not on a real device.
I’ve also made sure I have my Watch Extension and Watch App selected under Target Membership for the .intentdefinition file.
I’ve also tried going into Settings > Developer and enabling Display Recent Shortcuts then tapping Force Sync Shortcuts to Watch, but that doesn’t change the behavior.
Are voice shortcuts for these custom intents even supported on Apple Watch? I haven’t been able to tell one way or another with Apple’s documentation. The SoupChef sample project is set up with an Intents Extension for the watchOS app, which makes me think it should be supported. And, since it works on the simulator, that makes me think it should be supported.
However, this page doesn’t list custom intents as being supported on watchOS, so that makes me think they may not be supported: https://developer.apple.com/design/human-interface-guidelines/watchos/user-interaction/siri/
If anyone can help me figure out whether this is supported I’d really appreciate it. I’m not sure if I’m doing something wrong or if this just isn’t supported.

The problem was on my Apple Watch.
I was able to get it working by erasing the watch (Settings > General > Reset > Erase All Content and Settings) then restoring it from a backup.

Related

Is an Apple watch app required in order to use SiriKit?

I've set up Siri on my iOS app- I am able to call intents using INAddTasksIntent and it works great.
When I say "Hey Siri, add task clean my room to JoshApp" it works great.
However, Siri does not work on my Apple watch, using the same commands. When I say "Hey Siri, add task clean my room to JoshApp", it will say it cannot find the app or to look on the app store.
Do I need to create a separate Apple watch app and handle the Siri intents there? Based on my research (which incidentally, there is very little documentation around it), it doesn't seem like it is possible unless you set up a watchOS app.
Intents are delivered to individual devices as part of app bundles:
Overview
Interactions with SiriKit occur through your Intents app extension, which you deliver inside your iOS or watchOS app bundle.
[...]
Enable the Siri Capability
Enabling the Siri capability adds a set of entitlements to your app. The App Store requires the presence of these entitlements for any iOS app or watchOS app containing an Intents extension.
[...]
Source: Creating an Intents App Extension
Without the associated app bundle being installed on the watchOS device, it's (loosely, I'll admit) implied that you won't be able to add an Intents extension to meet your requirements.

Intent does not appear in Supported Intents

Link to all the code I'm working with so far: https://github.com/banool/respose.
I want to make an app where it is possible for users to activate some intent it defines as an action in response to some event in the iOS shortcuts app. For example:
If I open app X.
Run intent from my app instead.
I've seen this done before in other apps, so I know it's possible.
I have an intent defined (see attached code as well as image) that seems to be correct as far as I can tell. I don't think I need an intent extension because I don't intend to handle the intent in the background or via Siri.
I notice that when I try to add an intent under My Target -> General -> Supported Intents, the dropdown doesn't show my intent, only the built in system intents.
I'm not sure what I'm doing wrong here. I got to this point just by following the official guide from Apple: https://developer.apple.com/documentation/sirikit/adding_user_interactivity_with_siri_shortcuts_and_the_shortcuts_app.
I don't think the fact that I'm using Flutter should matter so much right now (I figure that's more of a concern for when the app actually opens up from the shortcut), but perhaps I'm wrong.
I have registered the app on App Store connect and I'm using an identifier that has the sirikit capability enabled. I've also added the "Siri" capability in XCode. I've tried this on both a simulator and a real device, the results are the same.
Any help would be much appreciated, thanks!
Had the same issue.
It seems that you can just type the class name without prompt, and it should work just fine. Don't forget to select proper target though

Can't disable Sirikit in an app

I added SiriKit to a version of my, but then decided to remove it. The problem is that Siri still offers to use my app when I ask it to do the function that app used to do. I have deleted and re-installed the app (with no Siri support), but it still wants to use my app when I speak the keywords that another version of the app once supported. I restarted the iPhone, but it still remember. I also disabled Siri in the settings for this app; still remembers.
Is this an iOS 11 bug?
Found the solution:
You need to go back to the version of the app that supported SiriKit and in the info.plist for the Intent extension and in the IntentsSupported remove the intent that your app previously supported and replace it with some other intent.
Seems like an iOS bug. Disabling Siri for the app in the Settings should have disabled Siri from using the app for the intent.

Open Siri using private API's in iOS 8

I want to make an app that won't be released on the App Store. I want this app to open siri through private API's, basically inject a home button press and hold into the events queue. I have tried using GSEvent(GSSendEvent - Inject Touch Event iOS), but it no longer works(it silently fails) after iOS 7. I believe it is possible through SBUIController but I can't figure how to use SBUIController in iOS 8. To be clear, I want to do this on a non-jailbroken phone.
How can I go about doing this in iOS 8?
Thanks
You should check out the runtime headers of all the private/public apis here.
I found a method hidden in accessibility, which could possibly work in your case. Have a look at it here: http://git.io/frK6Sw . The method is named -(void)openSiri, which suggest that it might open Siri, I haven't tried though.

In-app preferences screen in an iOS 7 app

I'm fairly new to iOS development and I am porting an Android app to iOS 7. The Android app provides a screen that allows the user to change a number of non persistent settings. Because these are not saved, it doesn't seem appropriate to me to expose them, on iOS, as preferences via a settings bundle and the built-in Settings app. So I'm looking at an in-app settings screen, which I understand is allowed - but perhaps not encouraged - by Apple.
Some questions:
Am I correct that an in-App approach is allowed by Apple? Most example code seems to use settings bundles. Am I going to have problems when the app is submitted to the App Store?
I can put the settings UI in a simple UITableViewController, but is there an approved way to expose this to the user? XCode 5 doesn't provide a settings identifier (and icon) for toolbar buttons, and the "Info" identifier (letter i inside a circle) seems to have been dropped too. Should I use a custom icon? Are there any de facto standards?
I haven't seen this kind of UI element before on iOS but my exposure to the platform as a user is limited.
There is nothing wrong with doing an in-app preference (table)view. You won't be rejected for that (this point seems to be way too much exagerated outside the iOS community). There are guidelines that you can follow: iOS Human Interface Guidelines... or not. As long as you don't use private APIs (assuming you know how to access them anyway), you're fine! So you can use a custom icon, the "i" button, or any UI element that convey the reasonable meaning of providing access to more info/preference.
In your code, you can use the class NSUserDefaults (with the standardUserDefaults) to store your preferences.
Many apps have in-app settings. It's fine. Apple even states that it is fine. Just don't have both.
Use a custom icon. Many apps seem to use an icon that looks like a gear.

Resources