我有一个工作空间,想要在其中添加Core Data。我进入了需要添加Core Data的项目,选择了目标,点击“Link Wit Binary Files”下的加号,添加了Core Data框架。这一步骤完成得很好,我可以构建和运行。接下来,我尝试使用以下代码:
#import <CoreData/CoreData.h>
我遇到了构建错误。 这些构建错误看起来像:
"ARC Semantic Issue"
Pointer to non-const type 'id' with no explicit ownership
这些错误存在于
NSEntityDescription.h
NSManagedObjectModel.h
NSMnagedObject.h
NSManagedObjectContext.h
NSPersistentStore.h
有人知道为什么我无法将Core Data导入现有的iOS项目吗?谢谢!