iOS 10: Integrating Siri Kit to your apps – Part 1
Audio : Listen to This Blog.
In Apple Conference WWDC 2016, one of the biggest announcements that made headlines is to release Siri APIs for the third party developers. In this articles series (part 1 & part 2) we will dive deep into how Siri works, its architecture, and how to implement Siri in your own app.
What is Siri?
Siri is your personal assistant! Yes, she is a voice-activated assistant, she mimics your intelligence and the natural conversation which you do. When Siri arrived back in the year of 2011 till now, greatly improved as software and finally having developers to use this for their own apps!!
Siri is supported with iOS, watchOS, and tvOS operating systems, currently it is running with more then 40 languages. Siri has been an integral part of iOS since iOS 5 and it was introduced as a feature of the iPhone 4S on October 14, 2011; the Original Author is SRI international ( Stanford Research Institute ) .
Siri uses natural language processing to interpret the text, and converts it meaningful representation for a task to handle. Further here is a great Interview with Tom Gruber, who was CTO of Siri Inc prior to acquisition by Apple.
How Siri meets Developer needs?
Siri now supports to limited ‘domains’. A domain is a broad category of thing that Siri understands, and knows how to talk about. Now it can support for your app only if your app can serve requests on six domains as listed here: Messaging, VoIP calling, Payments, Photo, Workouts, Ride booking, Restaurant reservations (Maps only) & CarPlay (automative vendors only).
As per Apple Guide: Each domain defines one or more tasks that an app can perform. These tasks are known as intents because they represent the intentions of the user, and each intent is represented by a custom class whose properties contain information related to the task.
Intents Extension & IntentsUI Extension– what is this?
For functional SiriKit integration you need to use Intents Extension (Intents Framework) and for branding/Customising of Siri results you need IntentsUI Extension. In Xcode 8 beta which is available now here, you can try adding Intents Extension from application extension templates.
Per apple documentation:
receives intent objects from the system and performs the associated tasks. This extension is required.
Intents UI extension
lets you customise the Siri or Maps interface after an intent has been handled successfully. This extension is optional.
In the next article here we shall explore how we can prepare Siri enable applications, we will run you through a sample code and hence you explore it further.