You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a project where I have introduced Swift classes.
As soon as I ran the project I ran into this assertion:
NSAssert(objectClass, @"Cannot initialize an entity mapping for an entity with a nil managed object class: Got nil class for managed object class name '%@'. Maybe you forgot to add the class files to your target?", [entity managedObjectClassName]);
So what I did is update my Swift file with the objc( ) annotation like so:
// Issue.swift
import Foundation
import CoreData
// TODO: This was added manually. Not nice.@objc(Issue)classIssue:NSManagedObject{@NSManagedvarrepository:Repository@NSManagedvarresponsible:User@NSManagedvarversion:Version}
I am wondering if there is a better way around this issue. Because as soon as I will update the model and re-generate the classes the correction will be overwritten again.
The text was updated successfully, but these errors were encountered:
I ran into the same issue after auto-generating a new entity with XCode 7.0. I solved this by going to the Data Model Inspector for the respective entity and deleting the 'Module' field.
I have a project where I have introduced Swift classes.
As soon as I ran the project I ran into this assertion:
With the help of the SO Post Swift RestKit CoreData - RKEntityMapping nil class for class name I was able to resolve the issue.
So what I did is update my Swift file with the
objc( )
annotation like so:I am wondering if there is a better way around this issue. Because as soon as I will update the model and re-generate the classes the correction will be overwritten again.
The text was updated successfully, but these errors were encountered: