Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Script for automated mogeneration execution in Xcode
type mogenerator >/dev/null 2>&1 || {
echo >&2 "warning: mogenerator not found. You will need it when changing core data model";
exit 0;
CURRENT_VERSION=$(/usr/libexec/PlistBuddy -c "Print :_XCCurrentVersionName" "${PATH_TO_MODELD}/.xccurrentversion")
echo "Used model path ${MODEL_PATH}"
mogenerator -m $MODEL_PATH -O $OUTPUT_PATH --template-var arc=true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment