Xcode 11 doesn't recognize Core data Entity

前端 未结 4 935
轻奢々
轻奢々 2020-12-31 20:33

I just declared an entity called \"Users\" array:

var UsersArray = [Users]()

I got this error:

use of unresolved id

4条回答
  •  無奈伤痛
    2020-12-31 20:52

    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)

提交回复
热议问题