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.
Related
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.
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.
Before release of iOS 10, extension only works with container app. There is no way to create independent extension without parent app.
But after release of iOS 10, I found that we can deploy Sticker iMessage Pack without any parent application.
So can we create iMessage App with other functionality, independent of parent application?
If yes, then can we use In App Ads for monetization within iMessage Extension ?
You can either create an independent iMessage app, or an extension to an iOS app. Note: currently, if you create an iMessage app and decide later you'd like for it to have a parent iOS app, you won't be able to do that in iTunes Connect.
In my experience you also can't load ads in an iMessage extension, and external links are prevented. So your best bet is to use in-app purchases or charge for the app to monetize it.
Yes, here is iMessage development guide.
We can develop Standalone App as well as Extension for Application.
I have a settings bundles that I use with my watch app. I am migrating my app to watchOS 2. Does anyone know how setting bundles are supposed to work? Does the iPhone transfer the values to a the standard user defaults or to a user defaults with a suite name for a shared app group? I can't get either to work and I can't find any documentation on how setting bundles are supposed to work with watchOS 2.
The accepted answer is wrong. You can use Shared App Groups for the Settings bundle on WatchOS 2 and access the values via NSUserDefaults. No Watch Connectivity required. It is just tricky to set up and the official documentation is missing crucial info.
Recently discovered how to do it in my question here.
The 2 important points are:
You need to enable Shared App Groups on all 3 targets (iOS app, Watchkit app, WatchKit extension)
It only works on the real device, not simulator. You might need to remove the app from both devices and reinstall to have it start working.
In Watch OS 2.0 since the Watch App extension is in the Apple Watch (not in the iOS App as in Watch 1.0) you can't transfer data through user defaults, so you should use instead WatchConnectivity.
If you have a settings bundle or a framework and you want to use it in the AW App extension and in the iOS APP, you should import it in every target of your project.
Has anyone combined these two new features in iOS8 yet? I'm attempting to access HealthKit from a widget. But since the application and extension use two separate App IDs - the widget automatically rejects access to HealthKit. The Notification Center/Today view doesn't display any prompt to allow access. I notice it attempts to because I see an "unbalanced view controller transition" warning in the console, but nothing is displayed.
For a manual fix - the Health app will display the bundle ID with permissions that can be manually changed. However, there's no app icon and the extension is listed as its bundle ID and not listed as its product name. This makes me think this is still something they are working on in the beta.
You could try to access the HealthKit data from your containing app and then share those data with your extension through App Group.
I haven't looked at HealthKit yet, but in another case the App Group feature worked fine for me.
I haven't tried doing this type of combination between those features in my app yet, but while integrating the HealthKit capabilities, I happened to see the following in HealthKit documentations:
Both HealthKit and the Health app are unavailable on iPad. The HealthKit framework cannot be used in an app extension
So I assume a direct way is not available... You can read more here: HealthKit_Framework Documentation
You won't be able to access HealthKit. To quote Apple's App Extension Programming Guide:
Some APIs Are Unavailable to App Extensions
Because of its focused role in the system, an app extension is ineligible to participate in certain activities. An app extension cannot: …
Use any API marked in header files with the NS_EXTENSION_UNAVAILABLE macro, or similar unavailability macro, or any API in an unavailable framework
For example, in iOS 8.0, the HealthKit framework and EventKit UI framework are unavailable to app extensions.
[emphasis added.]