Xcode 11 doesn't recognize Core data Entity

Please try this solutions !!

Solution 1 :- Product->Buld for testing solved this issue for me(it solves most unresolved identifier bugs for some strange reason)

Solution 2 :- changing import Foundation to import UIKit. It seems like UIApplication isn't included in Foundation framework.

Solution 3 :- Highlight the Data Model, go to Editor -> Create NSManagedObject Subclass...

Hope this helps thank you..


If your entity is actually created, just close and re-open XCode. This works for me everytime. The other solutions, such as clean build, build etc, didn't work for me.


Just ran into this issue after renaming an entity and figured I should post here how I resolved it.

Typically after making changes in the data model and getting compilation errors, I just do Product > Clean Build Folder, then Product > Build and that should take care of the errors.

However, the steps above didn't help this time. After scratching my head for while, I found the culprit with following steps:

  1. In the Project navigator, select your .xcdatamodelId file
  2. In the Configurations section, select the appropriate configuration
  3. Look for the entity in question and make sure the class name is correct (in my case, the entity and the class were not the same)