I just thought about to use a NSPersistentDocument and in my data model i like to store some binary data.
Well since 10.7 Core Data provide external storage feature. Does somebody know or even have tests (maybe some samples) what happen when you use it in combination with NSPersistentDocument?
I think i read if you put at least 1MB binary data in it core data will create a separate file and store only a ref in the database. But what will happen if you use it with NSPersistentDocument? I would be nice if it create a bundel and manage the external files in a folder.
Did somebody try?
I tried. It does not create a bundle. The external data ends up in an invisible folder in the same directory as your document. It will not get copied, moved or deleted together with the document, so you risk data loss if you copy or move the document.
I wrote a detailed answer on that here.