0

I recently cleaned up an old iOS project and I want to add CoreData. I last worked on this project when iOS 4 was still new.

I am using a bit of boiler plate code I use for another project. This code creates a singleton from which I can access my PersistentStoreCoordinator.

#import <CoreData/CoreData.h>
@interface CoreDataManager : NSObject {
    ....
}

I added my files to my project, added the framework and linked to CoreData.framework in my target.

My project compilation now fails on NSPersistentStoreCoordinator.h, NSPersistentStore.h, NSAtomicStore.h with

  • Parse Issue Expected ';' after method prototype
  • Parse Issue Expected an Object-ve-C directive after '@'

I am fairly sure it is not my CoreData code since I use the files in another project with no issues.

Megasaur
  • 626
  • 8
  • 20
  • I widened my search and looked for anyone having compile errors with iOS frameworks. I found http://stackoverflow.com/questions/11857765/ios-parse-issues-in-nsobjcruntime-nszone-and-nsobject so I took a look at my other project's .pch file and found #import . I looked at mine old project and sure enough it wasn't there. Ok. I still don't understand this. Why didn't Xcode update the .pch for me? – Megasaur Jul 22 '13 at 22:36
  • Xcode doesn't update the pch. If you added the framework, it shouldn't be necessary to put it there if you also import it wherever you use Core Data classes. – Tom Harrington Jul 22 '13 at 23:43

0 Answers0