diff --git a/LeCountdown/LeCountdownApp.swift b/LeCountdown/LeCountdownApp.swift index 1d7dff2..642b6df 100644 --- a/LeCountdown/LeCountdownApp.swift +++ b/LeCountdown/LeCountdownApp.swift @@ -25,6 +25,17 @@ struct LeCountdownApp: App { UIPageControl.appearance().pageIndicatorTintColor = UIColor(white: 0.7, alpha: 1.0) self._registerBackgroundRefreshes() + self._initSchema() + + } + + fileprivate func _initSchema() { + + do { + try persistenceController.container.initializeCloudKitSchema() + } catch { + print("ERROR \(error)") + } } diff --git a/LeCountdown/Model/Persistence.swift b/LeCountdown/Model/Persistence.swift index d1730ca..5b8c7ac 100644 --- a/LeCountdown/Model/Persistence.swift +++ b/LeCountdown/Model/Persistence.swift @@ -65,8 +65,8 @@ struct PersistenceController { let options = NSPersistentCloudKitContainerOptions(containerIdentifier: id) storeDescription.cloudKitContainerOptions = options - let remoteChangeKey = "NSPersistentStoreRemoteChangeNotificationOptionKey" - storeDescription.setOption(true as NSNumber, forKey: remoteChangeKey) +// let remoteChangeKey = "NSPersistentStoreRemoteChangeNotificationOptionKey" +// storeDescription.setOption(true as NSNumber, forKey: remoteChangeKey) container = NSPersistentCloudKitContainer(name: "LeCountdown") container.persistentStoreDescriptions = [storeDescription]