Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Importing Core Data to existing project fails

Tags:

ios

core-data

I have a workspace and I'm trying to add Core Data to it. I went to the project I want to add Core Data to, selected the Target, hit the + sign under Link Wit Binary Files and added the Core Data framework. That part works fine. I can build and run. When I try the next and using this line:

#import <CoreData/CoreData.h>

I get build errors. These build errors look like:

"ARC Semantic Issue"
Pointer to non-const type 'id' with no explicit ownership

These errors are present in

NSEntityDescription.h
NSManagedObjectModel.h
NSMnagedObject.h
NSManagedObjectContext.h
NSPersistentStore.h

Does anyone know why I'm not able to import Core Data to an existing iOS project? Thanks in advance!

like image 884
Crystal Avatar asked Sep 07 '13 20:09

Crystal


1 Answers

In my framework search paths, I had an erroneous path that correctly built once I removed it:

$(DEVELOPER_DIR)/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks
like image 124
kevinl Avatar answered Sep 23 '22 01:09

kevinl