From the course: iOS App Development: Design Patterns for Mobile Architecture
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Expand layers, part 2
From the course: iOS App Development: Design Patterns for Mobile Architecture
Expand layers, part 2
- [Instructor] So let's go down into this data layer and there's a couple things that we need to resolve within here. If you go to the App Delegate, when we initially create this project Xcode puts the persistent container within the App Delegate. It is definitely a data concern so a great thing to do is to move that down into your data layers as soon as you have them. So we will go to our data layer, and the first thing we will do instead of having a pointer to the App Delegate or this persistent container. We'll just create that persistent container inside of here. And then we said, in the save method that we were going to hem that translator. So we're saying translation layer, and it's a translation layer, let's see if we can get it to code hint for us, translation layer. And then we are going to, go ahead and collapse this panel, and we'll say just translation layer to unsaved core data. And all of that translation layer is responsible for is translating from the DTO objects, and…
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.