Search code examples
objective-ccore-datamogenerator

Core Data/Mogenerator - No Getters/Setters Created


I'm using Mogenerator to help with my Core Data implementation and for the most part it works great. However, sometimes when I add new attributes, build, and run the project, I get the following error whenever I try to access the property:

[MyObject myAttribute]: unrecognized selector sent to instance

After looking into the machine generated class, it looks like Mogenerator creates getters/setters for some of my new attributes but not ALL of them. What am I doing wrong? How can I still get/set these new attributes when Mogenerator doesn't give me access to these methods?

What I've tried: 1. Synthesizing each new attribute in my Human generated file (this gets rid of the errors at least, but doesn't actually save anything to Core Data) 2. Writing a custom getter/setter for each missing attribute in my Human generated file (same results as above)


Solution

  • Okay, I forgot to follow rule #1 of resolving computer problems... delete and re-install.

    I'm using BitBucket to host my repository so I just deleted my local copy and cloned the project back to my machine. It runs fine now. I'm calling this issue "closed" for now, but any thoughts on why this would happen?