I saved a NSData (of UIImage) in an attribute of CoreData. There are still some other attributes under the same entity. How can I remove just the NSData stored, but not removing the whole NSManagedObject? I tried overwriting it to nil, but the size of DB did not change at all, which means the NSData is not removed?
It means the amount of space used to store some value for that attribute is still there, but it does not mean that you did not successfully obliterate the value. Did you use [managedObjectContext save:&error]
after writing to the value? If so and it reported no error then the value is gone.
(Does the size of the store really increase when you set an attribute? I expect it would when you add an entity but not just for setting an attribute.)