Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialSherrie Jones
4,178 PointsAll NSManagedObject... references display errors.
I'm using Xcode 6.1.1 and iOS 8. When I create the Diary project, I do not have the option to create an empty application, so I have used the Single Application. Immediately, I get 18 errors complaining about all references to every project/method in both .h & .m throws an error that starts with NS.
Unknown type name 'NSManagedObjectContext' Property with 'retain or (strong)' must be an object type etc.
I haven't even tried to do anything else beyond the initial Diary project creation.
Any ideas or help would be greatly appreciated.
2 Answers
Theodore Karropoulos
22,149 PointsJust cut and paste
#import <CoreData/CoreData.h>
from AppDelegate.h file into THCoreDataStack.h file.
Worked for me.
Alexander Unruh
1,997 PointsThat worked for me. Thank you!
Frank Barrett
16,088 PointsWorked for me too, thanks
Hamish Lockie
5,088 PointsThanks, that works.
Darean Wong
Courses Plus Student 4,186 PointsThis might sound crazy, but I was having the same problem with cutting and pasting over the mentioned methods from AppDelegate.m and AppDelegate.h on Xcode 6.3.2 . I've imported the CoreData/CoreData.h
file and also added the CoreData.framework manually to my project but it didn't work.
Turns out it was some kind of weird parsing issue with my version of Xcode. I had to manually retype the lines that were giving errors and the errors went away one by one.
Tayyab Hanif
3,601 PointsTayyab Hanif
3,601 Pointshey ! Im having same issue. did u happen to come across solution to this ?