 
 import CoreData
 import SwiftUI
+import CloudKit
 
 extension CD_Controller: Controller {
 

        container.viewContext.automaticallyMergesChangesFromParent = true
        self.container = container
        
        if #available(iOS 14.0, OSX 11.0, *) {
            self.syncMonitor = AnySyncMonitor(CD_SyncMonitor(container))
        } else {

        let url = CD_Controller.storeDirectoryURL
        log.debug(url)
        return url
    }
    
    override init(name: String, managedObjectModel model: NSManagedObjectModel) {
        super.init(name: name, managedObjectModel: model)
        let description = self.persistentStoreDescriptions.first!
        let id = "iCloud.com.saturdayapps.Hipstapaper"
        let options = NSPersistentCloudKitContainerOptions(containerIdentifier: id)
        description.cloudKitContainerOptions = options
    }
}

