dontWatchMyProfile
dontWatchMyProfile

Reputation: 46300

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?

Upvotes: 7

Views: 10671

Answers (2)

Marcus S. Zarra
Marcus S. Zarra

Reputation: 46718

Please review my answer to your other nearly identical question regarding binary size in the model.

Upvotes: 3

JeremyP
JeremyP

Reputation: 86651

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

Upvotes: 8

Related Questions