It looks like the recent Xcode 3.2 has added some code generation niceties that (I think) were lacking pre-Snow Leopard.
I took the following steps:
Define a simple .xcdatamodel model with a few entities, including one (inversible) one:many relationship (an
Endpoint
has manySubscription
objects)File -> New and select the (icon-less) "Managed Object Class". From that wizard, I selected my classes and I was off to the races.
Until, that is, I tried to build. I get this result and can't figure out:
Undefined symbols: "_OBJC_METACLASS_$_NSManagedObject", referenced from: _OBJC_METACLASS_$_Subscription in Subscription-B5BE258DF28BC03B.o _OBJC_METACLASS_$_Endpoint in Endpoint.o "_OBJC_CLASS_$_NSManagedObject", referenced from: _OBJC_CLASS_$_Subscription in Subscription-B5BE258DF28BC03B.o _OBJC_CLASS_$_Endpoint in Endpoint.o ld: symbol(s) not found collect2: ld returned 1 exit status
What I'd love help with:
If anyone has any ideas of what I just did wrong, that'd be fantastic.
It looks like the only way to get Xcode to re-generate your classes is to File -> New and replace them again, which (among other things) results in duplicate references to the new classes and your old class files uselessly left in a moved-aside folder in your project. Anyone know how to keep these in sync correctly? I haven't found any Apple documentation that covers the new stuff.