From the course: iOS Development: Siri Shortcuts

Unlock the full course today

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

Displaying invoice view

Displaying invoice view - iOS Tutorial

From the course: iOS Development: Siri Shortcuts

Start my 1-month free trial

Displaying invoice view

- [Instructor] Our invoice view has been created but we still have to display it to the user. Jump into the Intent View Controller, which is part of the HotCoffeeIntentsUI and you will see a function called configureView. This is where you will configure and show the invoice view. The first thing we need to do is we need to get the intent. So guard let intent equals interaction.intent and we will convert or cast this particular intent to OrderCoffeeIntent. From the CoffeeIntent we can get the actual order. So let's go ahead and get the order and we can pass in the intent to get the particular order. If this particular thing fails then we are simply going to fire the completion handler and pass in the value false with an empty set and empty an size, meaning nothing gets displayed. If you try to build this application it is going to tell you that Order does not really exist on line number 31. This is because the order…

Contents