Xcode 11 doesn't recognize Core data Entity

前端 未结 4 951
轻奢々
轻奢々 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:38

    Other possible solutions:

    (A) Re-launch Xcode

    This is the solution that worked for me.

    (B) Check if you did not forget to finalize your entity description

    Typically: forgot to assign a type to one of the attributes (still "undefined").

    (C) Clear derived data

    Reason: The generated core data managed objects subclasses's source code files are in the project’s derived data location. Note: you might have to re-link your swift packages is using SPM.

提交回复
热议问题