xcode


Create NSManagedObject subclass not generating property after updating to Xcode 6.0


After updating to Xcode Version 6.0 (6A313), when I add a new attribute to my xcdatamodeld entry, "Create NSManagedObject subclass" is not adding the new property to the generated header file. This works fine after closing Xcode 6, and then running Version 5.1.1 (5B1008). I repeated this process a couple of times with the same results. Do I need to do something to allow a new Xcode version to properly manage my data models, or recreate them, or is this possibly just a bug with the new Xcode?
Here are the specific steps I took:
1. Open DataModel.xcdatamodeld in Xcode 6.0 (GM Seed).
2. Select correct entity
3. Click + to add new attribute
4. Enter name and selected Boolean type for new attribute
5. Editor->Create NSManagedObject subclass
6. Ensure proper data model is checked, click next
7. Ensure correct entity is checked, click next
8. Choose location to save (using root project folder), select Create
9. Choose "Replace" in dialogue box
10. Look for variable in generated header file. Variable not present.
11. Close Xcode6
12. Repeat steps 1-10 in Xcode 5.1.1, worked correctly
13. Repeated this process twice to verify same results
Thanks for any help!
Ok, I figured out a workaround but it would appear this is a bug.
For all the entities you want to regenerate, remove the existing files from disk try Editor->Create NSManagedObject subclass and select those classes that you have removed from disk.
The files that don't currently exist are regenerated. This fixed the issue for me.
I had the same problem, Xcode didn't generate new properties after I choose "Replace" files.
Just fix it doing next steps:
after you change or add new entity in .xcdatamodel select changed entity Class files at "Groups & Files" list
select "Delete" - "Move to Trash" (if need copy specific code from your class file)
now back to .xcdatamodel and select entity you changed
create new NSManagedObject subclass(use standard way)
This requires a workaround, but specifically the quickest way I found was:
Setup your project such that the generated files from the model, are in a folder of their own.
When you need to add/change attributes to your model, multi-select the set of auto-generated files, and hit backspace (and select move them to Trash)
Re-generate your set of NSManagedObject files from the Model, back into the same folder
Before deleting your files and/or the data model itself as suggested, check whether you have added the module name in the Xcode's Data Model Inspector under Entity/Class. If you have, removing it will solve the problem of auto generating the entity classes. It will, however, reintroduce the problem you fixed by adding it in the first place (see Swift - CoreData: warning: Unable to load class named)... With this in mind, it appears a better solution to add the #objc(<ClassName>) above the generated class than to add the module name in the inspector.

Related Links

App Testing iOS Xcode Swift
How can I run Score Label when I touch the object?
Swift: value of type (_)->has no member 'Generator'
Random Color Generation of my Choice
Xcode 7.3 constantly building in idle
Xcode error : Thread 1: signal SIGABRT in Swift (game application)
Xcode git not showing xcassets to commit
How to enable horizontal scrolling of text in NStextView window for OSX application?
How to prevent the Apple Watch from going to sleep?
xcode 7.3 can not find glances in my watch
Plotting multiple scatter lines in different rate?
Swift 3D Touch Quick Action not loading requested url
What is the default design size for Xcode storyboard?
UIImageView in table cell is not staying within frame original frame?
xCode 7: how to fix initialization of variable was never used consider replacing with assignment to '_' or removing it
Xcode Core Data models are missing

Categories

HOME
cocoapods
jboss
tomcat
mousemove
histogram
celery
elk-stack
kurento
tfs2010
orc
responsivevoice
createjs
xbap
django-rq
texas-instruments
pinterest
boomi
renderscript
psql
cmake-gui
dashdb
channel
sybase-ase
restier
window-managers
multi-dimensional-scaling
openbravo
django-import-export
tsung
sales
phpstorm-2016.1
infopath2010
steam-web-api
mongodb-3.4
restful-architecture
cups
testlink
eclipse-gmf
unification
llvm-ir
flipkart
yoast
fluid-mac-app-engine
permission-denied
jenkins-slave
gcal
iptv
algebra
popen
deedle
alertify
pecl
logical
mathjs
livereload
nsrunloop
jenkins-workflow
qpixmap
meld
maximize
processor
vaadin4spring
swiffy
i2b2
onepage-checkout
directx-9
cfwheels
hmisc
wso2ml
supercomputers
modern.ie
karma-coverage
flow-js
actionpack
incron
mod-auth-openidc
global-scope
senchatouch-2.4
sqlbindparameter
zend-search-lucene
sensormanager
colon
hints
apportable
unicoins
spiral
examine
towers-of-hanoi
telerik-ajax
uploading
microblogging
will-paginate
haiku
space-partitioning
nosetests
bll
qcar-sdk
channelfactory
aggregator
pinax
raw-data
downcasting
version-control-migration
service-factory
error-detection

Resources

Database Users
RDBMS discuss
Database Dev&Adm
javascript
java
csharp
php
android
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App