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.
Implementing CoffeeOrderDataManager - iOS Tutorial
From the course: iOS Development: Siri Shortcuts
Implementing CoffeeOrderDataManager
- [Instructor] At present, our CoffeeOrders are not persisted. Every time we run the application, we start fresh. But we can persist our CoffeeOrders in a database or a file-storage system. To make things simpler, we are simply going to use the userDefaults and put our CoffeeOrders in the userDefaults. To do that, I'm going to go ahead and add a new group, and I will call it Managers. Inside the Managers I'm going to go ahead and add a new file. Make sure that you select Swift File, and go ahead and add CoffeeOrderDataManager. You can call this anything you want, but since its duty is to perform with data and to interact with data, we're simply going to call it CoffeeOrderDataManager. We'll start with creating a class called CoffeeOrderDataManager, which will be responsible for getting all of the orders as well as saving the orders. In order to get the orders, we will create a new function called getAllOrders.…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
(Locked)
Adding intent definition file5m 20s
-
(Locked)
Donating the intent6m 29s
-
(Locked)
Setting up intents/intents UI project7m 5s
-
(Locked)
Implementing CoffeeOrderDataManager3m 40s
-
(Locked)
Using CoffeeOrderDataManager3m 49s
-
Placing order using custom intent6m 22s
-
(Locked)
Challenge: Coffee roast for the order36s
-
(Locked)
Solution: Coffee roast for the order3m 52s
-
(Locked)
-
-
-