Pregunta

I am trying to integrate Mogenerator into my Xcode 5 project. I am using RestKit along with Core Data, but the structure of my database has a tendency to change relatively frequently and I've found it difficult to keep up with these changes without something like Mogenerator.

I have followed the steps laid out in this tutorial, but when I build the Mogenerator target, nothing happens. The Log Navigator tells me that '0 machine files and 0 human files were generated.' I have two entities created in my Core Data model, Organization and Sport, where Organization has a 'to-many' relationship to Sport.

In the 'Run Script' section of my Mogenerator Target, I have /usr/local/bin in the 'Shell' text box because I cannot get the Build to succeed when I have /bin/sh in the 'Shell' text box. I am running this script:

mogenerator -m Recreation2/Recreation2.xcdatamodeld -O Recreation2/Model --template-var arc=true

where Recreation2 represents both the name of my project and the name of my core data model.

Why is nothing being created? And if I get to the point where something IS being created, where will it be created at?

¿Fue útil?

Solución

Make sure you set the custom class name for each Entity like so in your model. You need to make sure you change it from the default NSManagedObject or Mogen will ignore it.

/Users/john/Desktop/Screen Shot 2014-05-05 at 6.04.51 PM.png

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top