'filenames are used to distinguish private declarations of the same name' error

前端 未结 8 574
没有蜡笔的小新
没有蜡笔的小新 2020-12-08 00:40

I am getting this error on generating an NSManagedObject in Xcode 8.1 in Swift.

:0: error: filename \"DemoOne+CoreDataClass.swift\" used twice: \'/Us

8条回答
  •  时光说笑
    2020-12-08 00:54

    In my case Data Model (as example: MyCoreData.xcdatamodeld) was listed twice under Editor -> Create NSManagedObject Subclass... And here was reason why it was getting this type of error.

    What I did:

    1. I did delete MyCoreData.xcdatamodeld file.
    2. Created another Data Model as example MyCD.xcdatamodeld.
    3. Checked is here duplicated Data Models in here: Editor -> Create NSManagedObject Subclass...
    4. Clean and later build for two times.

提交回复
热议问题