Xcode sets syncable="YES"
by default for entities & properties, e.g.,
$ cat AppName/AppName.xcdatamodeld/AppName.xcdatamodel/contents
...
<entity name="Event" representedClassName="Event" syncable="YES">
<attribute name="timestamp" attributeType="Date" syncable="YES"/>
</entity>
...
Should I set syncable
to NO
? (I know I can do so by deleting syncable="YES"
from the contents
file or by adding the key-value pair {com.apple.syncservices.Syncable, NO}
under the User Info section of the Data Model inspector.)
Core Data is a framework that you use to manage the model layer objects in your application. It provides generalized and automated solutions to common tasks associated with object life cycle and object graph management, including persistence.
Core Data owns the record ID for all of the objects that it creates in CloudKit. And, for each one, we will generate a simple UUID to use as its record name. When the Record Name is combined with a zone identifier you get a CKRecord ID. At the bottom, you'll see how Core Data manages type information.
Add a Core Data Model to an Existing ProjectChoose File > New > File and select the iOS platform tab. Scroll down to the Core Data section, select Data Model, and click Next. Name your model file, select its group and targets, and click Create.
Yes, set syncable
to NO
because MobileMe syncing support is deprecated. See "Editing Core Data Models" of the Xcode 4.4 Release Notes:
Editing Core Data Models
- MobileMe syncing support is deprecated. However, the syncable property is still set to YES by default in the User Info Dictionary for entities and properties, but the model editor doesn’t show this setting. 10787672
To explicitly set syncable to NO for an entity or a property, add a key/value pair in your User Info Dictionary:
- Select the entity or property for which you want to turn off synching on a model file.
In the User Info section in the Data Model inspector, add this key/value pair:
- key - "com.apple.syncservices.Syncable"
- value - "No"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With