Skip to content

Instantly share code, notes, and snippets.

@mbinna
Last active October 13, 2015 03:58
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mbinna/4136335 to your computer and use it in GitHub Desktop.
Save mbinna/4136335 to your computer and use it in GitHub Desktop.
Invoke mogenerator during Xcode build
# The approach used here is adopted from the following source:
# http://nsscreencast.com/episodes/12-importing-into-core-data
#
# Since version 1.27, mogenerator automatically uses the current version of the data model
MODELS_DIR="MyModels"
DATA_MODEL="${MODELS_DIR}/MOPIncrementalStoreModel.xcdatamodeld"
# Homebrew stores mogenerator in /usr/local/bin
PATH=/usr/local/bin:${PATH}
mogenerator --template-var arc=true --model "${DATA_MODEL}" --output-dir "${MODELS_DIR}/"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment