From the course: iOS 10 App Development: Integrating SiriKit

Unlock the full course today

Join today to access over 22,400 courses taught by industry experts or purchase this course individually.

Send data from Siri to your app

Send data from Siri to your app

From the course: iOS 10 App Development: Integrating SiriKit

Start my 1-month free trial

Send data from Siri to your app

- [Instructor] If at some point your app has the potential to send the user from the intent interface over to your application, you should have as much data as possible to handle that intent within your app. For example, in our handle method, we are returning an inProgress code, which is going to tell Siri to tell the user that the transaction will be continued inside of our application. So let's take the user's name and amount that they're paying from here and then send it inside of our full app. So right underneath the comment her, I'm going to create a user activity. We'll call this activity and it's going to be of the type NSUserActivity and I'll set it equal to NSUserActivity and I'll call the constructor that receives an activity type and we'll just call this a payment. On this next line, this is where the magic happens. We're now going to associate this activity with some of the data from our intent. I'm going to give it the Payee's name and the amount that we're paying to that…

Contents