I could need some help, please. I'm working at an old project which is written in Objective-C. I haven't ever really worked with that language. The program uses Core Data. I have added a new entity (CourseContent) with its properties to the xcdatamodel because I need a new object. I clicked on Editor -> Create NSManagedObject Subclass and XCode created four new files:
- CourseContent+CoreDataClass.h
- CourseContent+CoreDataClass.m
- CourseContent+CoreDataProperties.h
- CourseContent+CoreDataProperties.m.
I've renamed the first two to CourseContent.h and CourseContent.m, so it better fits to the rest of the project.
Now I wanted to run the project, but it shows an error:
duplicate symbol _OBJC_CLASS_$_CourseContent in:
/Users/rr/Library/Developer/Xcode/DerivedData/LehrerApp-abwqpnehycsrglaplrxtulrrlplf/Build/Intermediates/LehrerApp.build/Debug-iphonesimulator/LehrerApp.build/Objects-normal/x86_64/CourseContent.o
/Users/rr/Library/Developer/Xcode/DerivedData/LehrerApp-abwqpnehycsrglaplrxtulrrlplf/Build/Intermediates/LehrerApp.build/Debug-iphonesimulator/LehrerApp.build/Objects-normal/x86_64/CourseContent+CoreDataClass.o
duplicate symbol _OBJC_METACLASS_$_CourseContent in:
/Users/rr/Library/Developer/Xcode/DerivedData/LehrerApp-abwqpnehycsrglaplrxtulrrlplf/Build/Intermediates/LehrerApp.build/Debug-iphonesimulator/LehrerApp.build/Objects-normal/x86_64/CourseContent.o
/Users/rr/Library/Developer/Xcode/DerivedData/LehrerApp-abwqpnehycsrglaplrxtulrrlplf/Build/Intermediates/LehrerApp.build/Debug-iphonesimulator/LehrerApp.build/Objects-normal/x86_64/CourseContent+CoreDataClass.o
ld: 2 duplicate symbols for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I've read a lot of other answers here, but nothing helped me. I checked Build Phases -> Compile Sources, there is no duplicate file. I set the No Common Blocks-Flag to no. I deleted "-ObjC" from Other Linker Flags. I looked in the four files and I haven't imported any .m-Files there.
I have no clue what's wrong here. Why is there something duplicated in the CourseContent+CoreDataClass as I have renamed it?? Is there any kind of cache which I have to delete?
I'd really appreciate some help! Please tell me if you need to see the code of the CourseContent-files.
Thanks!