Ok so this is the error I'm getting
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '"Place" is not a subclass of NSManagedObject.'
I assume that what it means is that 'Place' hasn't been added as an entity to the core data model??? But it has as shown by the image below.
I'm guessing that my assumption is incorrect though so any help or ideas would be nice.
I'm pretty certain that this is the line that's causing it:
NSManagedObject* place = [NSEntityDescription
insertNewObjectForEntityForName:@"Place"
inManagedObjectContext:context];
If you aren't using custom classes (no Place.[hm]), as it sounds like you're not, check the Entity tab, and make sure the Class name is blank (= NSManagedObject) – not Place.
I had the same problem with classes called Message and Connection. The error just appeared after adding an emailing facility using the MessageUI library. I believe the conflict occurs because the library will have classes named Message and Connection, therefore they are not seen to be subclasses of NSManagedObject. Changing their names by prefixing (in my case with an X) makes the entities unique. I intend prefixing all my entities in future so that there is less chance of the conflict arising.
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