duplicate symbol _OBJC_METACLASS_$_ClassName

Another reason for this, for those out there who did the same as I just did, might be that you re-created a managed object class. By doing that and choosing another group in the project structure, you accidentally create another reference to the same files.

I ended up with two references for header and implementation in both the root of the project and in my model group. Removing the topmost references to .h and .m files got rid of the linking failure.


Another rather simple thing to check is that you did not accidentally #import a .m file instead of a .h header file.

Happened to me.


You are linking the file MenuScene.m twice. You apparently have it in a static library and also in your main application.


Sometimes Core Data inserts AnyProjectNameModel.xcdatamodeld to the Compile Sources of the Build Phases. Check it and delete it and everything is run again... The error message just indicates the generated ManagedObjects... The correct place for the AnyProjectNameModel.xcdatamodeld is the Copy Bundle resources in the Build Phases. enter image description here