Problem
When you create a CoreData project with Swift, the following error occurs when you operate CoreData modal
CoreData:warning:Unable to load class named "book" for the Entity ' book '. Class not found, using the default Nsmanagedobject instead.
Solutions
1. Add @objc in Book.swift (book)
2. Modify the CoreData template
/Applications/Xcode.app/Contents/Developer/Library/Xcode/Templates/File Templates/Core Data
/nsmanagedobject subclass.xctemplate Copy to ~/Library/Developer/Xcode/Templates
the next, if there is no Templates folder, create the folder templates
Modify the ___filebasename___.swift file, add @objc (___filebasenameasidentifier___), as follows
Import Foundationimport COREDATA@OBJC (___filebasenameasidentifier___) class ___filebasenameasidentifier___: ___ coredatamanagedobjectsuperclass___ {___coredatapropertyimplementations___}
Restart Xcode and the new Nsmanagedobject subclass will automatically add @objc ($className).
Reference: Http://stackoverflow.com/questions/25076276/unabled-to-find-specific-subclass-of-nsmanagedobject
CoreData:warning:Unable to load class named problem in Swift CoreData