0

I can't fix this error:

Class not found, using default NSManagedObject instead.

The problem is that the properties of the file xcdatamodeld file are set correctly

Look at this:

enter image description here

enter image description here

I don't understand the problem

Matteo
  • 129
  • 2
  • 10
  • Sidenote: Avoid using "new" in variable names, follow the naming conventions https://developer.apple.com/library/content/documentation/Cocoa/Conceptual/CodingGuidelines/CodingGuidelines.html –  Apr 01 '17 at 23:21
  • @Sneak no, because the properties of the entity I set as the answer to that question and doesn't work anyway – Matteo Apr 01 '17 at 23:23
  • I am not sure what you mean. The duplicate suggests multiple checks and answers. Update your question with what you have tried so far and why it didnt work. Also, looking at your screenshot, the error says - Unable to load class named **VDC.Questions** for entity **Questions** . What is **VDC**.Questions? –  Apr 01 '17 at 23:28

1 Answers1

1

The problem is that you specify the Core Data entity Questions to be of class Questions (rather than NSManagedObject). This is often done to add convenience property accessors and methods.

So you need to provide a Questions subclass of NSManagedObject (or just null the class name in the Core Data editor).

P.S. You probably want to label the class as Question (singular) rather than Questions (plural).

DDP
  • 2,463
  • 1
  • 26
  • 28