-
Notifications
You must be signed in to change notification settings - Fork 0
Home
avendasora edited this page Oct 31, 2011
·
7 revisions
With the release of Xcode 4 the workflow to use mogenerator has changed due to Xcode no longer supporting the hooks that mogenerator used to trigger generation and to add files to a project. The scripts (one for .xcdatamodel files and one for .xcdatamodeld files) make it possible to gain some of that functionality back by being added as a new "Run Script" Build Phase on a Target.
Also included are the mogenerator mogenerator templates that I have created. They should be considered alpha quality only. While they don't cause any compiler errors, they aren't well-tested yet either. They will certainly be changing.
- Clone the repository to your local Workspace Directory (or elsewhere if you want).
- Add the mogenerator-support directory to your project, but don't copy the files in. Also, there is no need to add these to your build Target as they are only used during development and they are not needed in the built application bundle
- Open and modify the variables in the scripts to reflect your project structure
- Select your build Target in Xcode and add a new "Run Script" Build Phase and move it above "Compile Sources"
- Drag-and-drop the appropriate script on script field of the Build Phase you just added. xcdatamodel.sh for projects that don't use model versioning and xcdatamodeld.sh for projects that do use versioning
- Add the path to your Core Data Model file in the Input Files field.