Sirikit is Apple's latest "kit" extension to its SDK (Software Developer Kit) due alongside Xcode 8 and iOS 10 later this year. With Sirikit developers will finally be able to access Siri in their apps, allowing app users to control third-party apps using Siri. Read on to find out how to build Siri into an app.
Developers won't get full access to Siri, instead it supports specific services inside apps. So developers will be able to access messaging, photo search and phone calls, for example. According to Apple Sirikit also adds support for new services, including ride booking and personal payments. But you can't just create any app that uses Siri. You won't be able to control games using Siri, for example.
How to build Siri functions into iOS apps: domains and intents
Sirikit works using domains and intents. Developers create an extension to their app, that integrates the app with Siri. This extensions registers specific domains and intents that it can handle.
This way Siri knows to pass on the voice request to the app, even if the app isn't running. Siri handles all of the user's interaction, using Apple's powerful voice and natural language recognition.
Once Siri has analyzed the voice request, it will send the intent to the domain (which is your app). Extensions ensure that users get a uniform experience across multiple apps. Sending a message from Siri in a third-party app should work the same way as sending it in Apple's own
How to build Siri functions into iOS apps: what kind of apps can work with Siri
The extension approach used by Apple means that developers need to be aware of which intents in the embedded frameworks are available. While these offer a uniform experience at the user end, it comes at the expense of complete freedom. You can only use Siri in your apps in certain instances.
Apple's Developer documentation lists all the intents, and the names of the APIs give you an idea, such as INBookRestaurantReservationIntent and INCarAirCirculationModeResolutionResult, give you an idea of what they all do.
According to Apple's Introduction to Sirikit, you can add Sirikit support only if your app implements one of the following types of services
- Audio or video calling
- Searching photos
- Ride booking
Apple's Sirikit page outlines examples of the kind of requests that developers can integrate into their apps
- Ride Booking. Request a ride through apps that provide ride sharing and other taxi-like services.
- Send text messages through apps that support messaging services.
- Photo Search. Look for photos and videos of particular content type and play slideshows in the app of their choice.
- Send and request payments to and from other people, using apps that support personal payments.
- VoIP Calling. Initiate video and audio calls with apps that support voice over IP.
- Start, pause and end workouts using your favorite workout app.
- Climate and radio. Specifically designed for CarPlay automaker apps, this allows users to set the climate controls and adjust the radio while they’re in their car.