Persistence with Core Data
In this chapter, I will introduce Core Data in SwiftUI. Core Data is a persistency framework for Apple systems. We will also briefly talk about persistence from a more general perspective. As Core Data was introduced in 2003 and has constantly evolved since then, it is not possible to completely cover this topic; it would require a large book just by itself. This chapter will be just an introduction to this persistence framework.
In this chapter, we will define persistency, and then we will move on to explain what Core Data is and how it is structured. We will then explain how to use Core Data within SwiftUI and offer guidance on the practical use of Core Data in Xcode. Finally, we will discuss CloudKit, a framework that easily allows you to store persistent data on the cloud.
In this chapter, we’re going to cover the following main topics:
- What is persistency?
- What is Core Data?
- Understanding Core Data framework classes
- Using...