What if, you are a third party software developer and want your users to tell Siri to command your App to do something? For the first time in five years this is now possible. With a new feature in iOS 10, we third party software developers can now add voice control support to our App!
our App must be installed, and the user must run the App, and (like other security controls in iOS), allow the App to access Siri. This is important to realize that your voice extensions run on the local device (unlike on Amazon Echo and Alexa). As you'll see, Apple has clearly defined use cases for how your App can extend Siri.
Siri extensions are specific to iOS. They work only on iPhone and iPad. Although macOS Sierra and Apple TV both have Siri, they cannot be extended (yet).
Apple has six specific domain categories that you can extend Siri for with your App. In other words, if your app has anything to do with these domains, it would be wise to consider how you can add Siri voice support to your App. On the other hand, if your App does not fall into these categories, then your App will not support voice interaction.
The domains are:
1. Voice Calls - Ok, if you have created an application for voice communication, specifically one which uses the oh-so-techie term VoiP (or Voice-over-IP). You can let your user start an audio call, start a video call or search a call history.
2. Messaging - Your App which offers messaging between users can use Siri to be prompted to send a message, search for messages or set attributes in a message. Your user can say "Send a message to Paul at MyChatAppName".
3. Buying / Payments - Your App can have your user verbally send a payment and request a payment from another user. There is no requirement to use Apple Pay, so we should see this used by third party apps to facilitate easier payment. This Siri enhancement is not for In-App purchases, which is specifically for non-physical goods.
4. Photos - Any App which manages photos can use Siri commands to search for photos and to play a photo slideshow. The user will have to verbally specify additional information to complete the commands. With searching photos, they could say "Look for kitty photos taken in 2015". This additional information is passed into your App which you can then act on.
5. Workouts - With fitness Apps, you can let your user verbally commands to start, pause, resume, end or cancel a workout. Usually this would take the form of a statement like "Start a workout in ThisFitnessAppName". Unfortunately there is no way to ask for a certain workout.
6. Ride Booking - Most people are not creating a transportation App. However, if you are, you can add the ability for the user to get a list of available rides, book a ride and to get the status of a booked ride. This is also tied into Apple Maps so the user can have a visual representation as well.
[ There are two other domains for Siri extensions: CarPlay and Restaurant reservations, but these require additional support from Apple, and not open to regular iOS developers. ]
With any of these commands, when performed on a locked device, iOS will prompt the user to unlock their device before completing any payment related requests. Additionally, you can define the voice commands available if the user's device is locked (or not).
This list of items is pretty limited, and does not allow for open-ended extendability, such as Skills are for Echo and Alexa. For example, there is no support to extend Music Apps, there is no mention of writing games. However, I believe that as this functionality grows into mainstream use, and developers realize the power of this, Apple will open up these other areas.
In the meantime, the process for extending your App is the same. Once you have determined how to extend your App for Siri support. You need to implement the functionality. There are a number of settings you need to ad to the plist.info file in your project. You only test on a real device as it is not provided in the Xcode simulator. The key framework (or library) is called SiriKit.
The code that you need to write needs to do the basics, like requesting that Siri support be added to your App (this is also the point which the user must give your App rights to support Siri). You then need to add some delegates to your ViewController class. These delegates are called and passed in any additional information required for a Siri command.
I hope this article gives you an idea of the domains for which Siri can be extended and a feeling for what needs to be done to add this great convenience to your App. Later, we'll get into more detail of how this works.