Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can Core Data store an NSData?

The documentation says, that core data properties can only store NSString, NSNumber and NSDate types. However, a lot of Core Data users claim Core Data could also store an NSData type. But I wasn't able to see that in the documentation, although the Xcode Data Modeler allows to choose a data type called "binary" (which seems to be NSData).

Did I miss something? Is there a hidden place in the documentation that indeed lists NSData for binary stuff?

like image 873
dontWatchMyProfile Avatar asked Jun 07 '10 10:06

dontWatchMyProfile


People also ask

Where does core data store data?

The persistent store should be located in the AppData > Library > Application Support directory. In this example you should see a SQLite database with extension . sqlite. It is possible that you don't see the persistent store in the Application Support directory.


1 Answers

According to the documentation, NSData is supported as an attribute type for Core Data. You should be able to use it without problems.

like image 126
JeremyP Avatar answered Sep 29 '22 16:09

JeremyP