Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

XCode: CoreData.Framework strange behavior with id

I have found a strange lines like:

id *_optimizationHints; <- in NSManagedObjectModel.h

id* _cd_snapshots; <- in NSManagedObject.h

id** _kvcPropertyAccessors; <- in NSEntityDescription

id* _debuggingRecords; <- in NSManagedObjectContext.h id *_cachedObsInfoByEntity; <- in NSManagedObjectContext.h

When i try to compile a project with ARC option, i see error like this: Pointer to non-const type 'id' with no explicit ownership

What's wrong? As i read from similar questions, i need to replace id * -> id

But this is Main CoreDate.Framework!

I can't understand this.

Can anybody explain this 'joke'?

like image 833
gaussblurinc Avatar asked Feb 19 '23 17:02

gaussblurinc


1 Answers

I encounter similar issue this morning. Seems the problem is due to the Core Data has been built in somehow. When we import the CD framework, I have to go to Building Phases to add dependency framework instead of drag and drop directly from Finder. Hopefully this is helpful

like image 51
user1594786 Avatar answered Mar 03 '23 22:03

user1594786