Xcode 11 doesn't recognize Core data Entity

自作多情 提交于 2020-03-21 06:12:18

问题


I just declared an entity called "Users" array:

var UsersArray = [Users]()

I got this error:

use of unresolved identifiers "Users"

hint : I did import CoreData and created the entity


回答1:


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..



来源:https://stackoverflow.com/questions/58651871/xcode-11-doesnt-recognize-core-data-entity

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!