I have been struggling with Core Data sigh so I decided to work this this Apple Core Data tutorial. I am at the point in the tutorial where it asks me to build the project I have put together so far. So I am presently right here in the tutorial. When I am building the project I am getting the following error:
Type of property 'managedObjectContext' ('NSManagedObjectContext *') does not match type of ivar 'managedObjectContext' ('MSManagedObject *__strong')
RootViewController.m
Ivar is declared here
That’s what I am getting in error window.
Here are what my files look like,
RootViewController.h http://pastie.org/4111206
RootViewController.m http://pastie.org/4111216
AppDelegate.h http://pastie.org/4111222
AppDelegate.m http://pastie.org/4111227
Your ivar is declared incorrectly. In RootViewController.h,
should be written, as the error complains,
And actually, with the modern run-time, for quite a while it’s been unnecessary (and usually ill-advised) to explicitly declare backing ivars for
@synthesize‘d properties. So you can just delete the ivar line entirely and let the compiler make an ivar for you.