This warning is quite annoying. It appears spuriously. I have been able to get rid of it in most cases by making sure that the class is set correctly in the model editor. Unlike in many other SOF posts, the suggestion to include the module name (like MyApp.Shows
) has not helped me.xcode
1.
Version that works up to Xcode 7 beta 3 app
Notice that I corrected your entity name to the more appropriate singular.post
Version that works for Xcode 7 beta 4 and above ui
You need to delete the text "Current Product Module" in Module!this
2.
You should also follow the frequent recommendation to include code
@objc(Show)
just above your class.ip
Note: If you are using Xcode 7 beta 4 or later, this step is optional.element
3.
Also make sure to cast the created managed object to the proper class, as the default would be just NSManagedObject
. get
var newShow = NSEntityDescription.insertNewObjectForEntityForName("Show", inManagedObjectContext: context) as Show