In my app I have an image for a user profile that a user can obtain from the camera. I do not want to manage an image outside of core data since I have a user object that manages all other data in the object very nicely.
What data type do I store the image as?
Does anyone have an example of where and how to implement setAllowsExternalBinaryDataStorage? I am not able to find an example.
Thanks!
You are on the right track. You want to store it as NSData. When you open the core data model gui (the one where you have a visual graph of your core data model) — Select the attribute, then on the right – where you would give it a type and default value and such — there will be a check box that says almost exactly what you want.
Check that box and Core Data will automatically use (and manage) the external file to store the data object.