Hello, I'm running into an odd error.
I'm trying to add a composite attribute called period
to a Core Data Entity named Report
, but I'm getting a compile-time error that points to my xcdatamodel file:
Report.period cannot use an attribute type of "Composite"
.
In my model configuration I have "Used with CloudKit" box checked. If I uncheck this box, the error goes away and everything builds fine. But the documentation for NSCompositeAttributeDescription says:
You may use composite attributes anywhere you use standard attributes, including lightweight migrations and CloudKit, through NSPersistentCloudKitContainer.
So it seems like I should be able to use composite attributes in Core Data with CloudKit syncing enabled.
What am I missing here? Is this a bug, or am I doing something wrong?