Search code examples
iosswiftcore-datacloudkit

Can I set "usedWithCloudKit" to false in core data contents


I'm trying to disable/ remove cloud kit in my project so that I can have ordered relationships in core data. From what I can tell, the only reference to cloudKit anywhere in my project is inside CoreDataDB.xcdatamodeld/My_Project.xcdatamodel/contents and these are the first two lines of the file:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<model type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="19574" systemVersion="20G314" minimumToolsVersion="Automatic" sourceLanguage="Swift" usedWithCloudKit="YES" userDefinedModelVersionIdentifier="">
...

line 2 has this snippet: usedWithCloudKit="YES"

Can I safely switch it to NO or is there another way I should go about removing cloud kit.

Extra notes:

  • Cloud Kit is not enabled in Signing and Capabilities
  • I'm not using NSPersistentCloudKitContainer
  • The original error I'm trying to solve is CloudKit Integration MyEntity.myCustomRelationship must not be ordered [8]

Solution

  • Check to see under "Configurations" if "Default" or any custom configurations you have in your Data Model file has "Used with CloudKit" checked. Should appear in the right panel when you select a configuration.

    enter image description here