I use UIDocument en NSFileWrapper to store "projects" containing quite a few large video files and small text files. There are several issues that I am facing, and I am starting to wonder if UIDocument remains the right strategy.
Performance
As far as I can tell, NSFileWrapper loads everything into memory. This can be a problem when working with large video files. I think you can get around this with custom save and load methods that do not conform to the NSFileWrapper standard.
Metadata STRONG>
I want to display a list of all documents along with some metadata. This may include, for example, a preview image, the number of recorded scenes, video length, etc. The only way to get this data now is to open each document and get it. Probably pretty slow, especially with large documents.
Solutions?
Now I see two solutions: completely remove the UIDocument and switch to my own architecture or use some kind of centralized metadata file. The disadvantages of the latter are that I have to manage the metadata in two separate places and that I need to synchronize them manually.
There is still a UIDocument, and if so: what could be the solution to these problems?
source share