I have a NSManagedObject subclass that I generated using the editor menu >> Create NSManagedObject Subclass...
It inherits everything and it looks like this: import Foundation import CoreData
class Person: NSManagedObject {
@NSManaged var firstname: String
@NSManaged var lastname: String
}
But, when I try to create an instance from my Person class I don't get code hinting entity: entityDescripition, insertIntoManagedObjectContext: managedObjectContext
for the designated initializer, when I ignore it and use it anyway this is what I get:
CoreData: warning: Unable to load class named 'Person' for entity 'Person'. Class not found, using default NSManagedObject instead.
But I have the Person class in my project, it is in my compile source in my build phases, the same thing in Objective C works immediately though..
Any thoughts?