nspersistentdocument

Using NSPersistentDocument to create 'Documents'

烂漫一生 提交于 2019-12-03 21:43:28
问题 I would like to create an app that uses Swift CoreData 'Documents' which work in the standard macOS fashion [custom extension, a single 'file'/filewrapper containing all data relating to that document] This does not appear possible. The documentation states very clearly that NSPersistentDocument does not support some document behaviors: File wrappers. [..] which makes me think that the usual ways of dealing with images in CoreData - binary data with 'allow external storage ' and save them to

Using NSPersistentDocument to create 'Documents'

点点圈 提交于 2019-12-01 00:15:38
I would like to create an app that uses Swift CoreData 'Documents' which work in the standard macOS fashion [custom extension, a single 'file'/filewrapper containing all data relating to that document] This does not appear possible. The documentation states very clearly that NSPersistentDocument does not support some document behaviors: File wrappers. [..] which makes me think that the usual ways of dealing with images in CoreData - binary data with 'allow external storage ' and save them to a different location, store the URL in the database - cannot be used with NSPersistentDocument. I want