SWIFT

    [Core Data] Entity Class 설정 - Codegen option 탐구

    [Core Data] Entity Class 설정 - Codegen option 탐구

    우리가 Core Data를 처음 마주하여 Entity를 생성하면, 이 Entity(Class)에 대해 Name과 Module과 Codegen을 설정해야 한다. Class Name은 Entity를 Class로 다룰 때 사용할 이름으로 어렵지 않았지만, Module과 Codegen은 그냥 봐서는 잘 이해가 가지 않았다. 마찬가지로 어려움을 느끼는 사람들이 있을 것 같아서 이 블로그 글을 작성하게 되었다. 1. Entity Class 설정 먼저 Entity는 Core Data가 관리하는 객체를 의미한다. 우리가 일반 코드를 다룰 때 이용하는 Class, DB를 다룰 때 이용하는 Table과 개념이 비슷하다. Entity를 생성한 후에는 새로 만들어진 Entity를 어떻게 사용할 건지 설정해 주어야 한다. 먼저..

    [애플 Document 번역] Core Data

    [애플 Document 번역] Core Data

    Apple Developer Documentation developer.apple.com Core Data 데이터를 하나의 디바이스에 유지하거나 캐시하고, 혹은 CloudKit을 이용해서 여러 대의 기기에 데이터를 동기할 수 있게 해줍니다. 개요 Use Core Data to save your application’s permanent data for offline use, to cache temporary data, and to add undo functionality to your app on a single device. To sync data across multiple devices in a single iCloud account, Core Data automatically mirrors you..