Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Core Data syncable & com.apple.syncservices.Syncable

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.)

like image 618
ma11hew28 Avatar asked Sep 10 '12 17:09

ma11hew28


People also ask

What is the meaning of Core Data?

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.

What is Core Data host in CloudKit?

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.

How do I create a Core Data model?

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.


1 Answers

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:

  1. Select the entity or property for which you want to turn off synching on a model file.
  2. In the User Info section in the Data Model inspector, add this key/value pair:

    • key - "com.apple.syncservices.Syncable"
    • value - "No"
like image 64
ma11hew28 Avatar answered Sep 28 '22 06:09

ma11hew28