[Core Data] Building Blocks
[Core Data] Building Blocks
bromp2022년 12월 15일 19:33 0 0 6 0



.xcdatamodeld 파일에서 생성

import Foundation
import CoreData

public class Movie: NSManagedObject {

Managed Object Context

  • Create, load and manipulate managed objects
  • A Single Application can have multiple managed object contexts
  • Responsible for executing queries on the store


  • Requires managed object context to initialize
  • Allows to setup underlying storage (SQLite is default)
  • Responsible for executing queries on the store
// prints the path of the documents directory
let dirPaths = NSSearchPathForDirectoriesInDomains(.documentDirectory, .userDomainMask, true)


  • XML (not available in iOS)
  • Binary
  • SQLite
  • In-Memory
댓글 0개
서버로 재접속을 시도하고 있습니다. 잠시만 기다려 주세요.