Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sanitize managedObjectClassName specifiying the current module #311

Merged
merged 1 commit into from
Nov 4, 2015

Conversation

casademora
Copy link

In the CoreData Model editor, an entity can have a specified module from which to be loaded. However, when specifying the current module, the entity class name is prepended with a ".". This is an invalid class name and also not helpful file name for the resulting generated files. The fix here is to check for the . and remove it in the file name and class name template.

rentzsch added a commit that referenced this pull request Nov 4, 2015
[NEW] Swift: strip uncompilable period prefix from +[NSEntityDescription managedObjectClassName] when an entity is specified to load from the current module. (Saul Mora)
@rentzsch rentzsch merged commit 01378b6 into rentzsch:develop Nov 4, 2015
@stephengazzard
Copy link

Do we know when a new official release that includes this will be come out? We are running into this on our project, it forces us to modify the data model before and after each run to get the correct class names.

@rentzsch
Copy link
Owner

Sorry about the delay. I'm unsure. FWIW it's easy to build your own mogenerator based of the develop branch. Just download https://github.com/rentzsch/mogenerator/archive/develop.zip, open mogenerator.xcodeproj and hit the build button.

@rentzsch
Copy link
Owner

Oh I'm pretty sure there's a homebrew way to do the above as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants