nsfilewrapper

NSMetadataQuery does not find NSFileWrapper folder bundles, only files (but they're there)

五迷三道 提交于 2019-12-06 07:24:49
I have a strange problem which I can't seem to solve on my own. Any help or thought is appreciated. The problem: NSMetadataQuery finds normal files (like test.txt) but no filewrapper bundle (myWrapperDocument.pro) However, NSFileManager finds all files in my ubiquity container - so the files are there, but NSMetadataQuery doesn't find them! The facts: UIDocument based app using NSFileWrappers Shared Ubiquity Container (for iOS and Desktop app) Works perfect on Mac OS Works perfect on my iPad Mini and my iPhone 4S and iPhone 3GS (running iOS6 and iOS5) Doesn't work on my iPad1 nor on most of my

iCloud & NSFileWrapper: Showing as 2 different files in Settings

久未见 提交于 2019-12-04 20:51:08
问题 I have an app that uses a UIDocument that is NSFileWrapper based. My file wrapper is a directory named "XXX.cp", with two sub-files "photo.data" and "photo.metadata". It seems to save and load documents fine, however when I go to Settings\Manage Storage\Unknown the sub-files are listed separately: I was expecting it to show "XXX.cp" instead of these two sub-files. I think I have the document UTI set up and exported properly: And I think I am creating the file wrappers correctly (especially

UIDocument & NSFileWrapper - large files taking a long time to save, despite incremental changes

╄→гoц情女王★ 提交于 2019-12-04 03:39:39
I have a UIDocument based app that uses NSFileWrapper s to store data. The 'master' file wrapper contains many additional directory file wrappers, each of which represents a different page of the document. When saving a large document for which only a small proportion of one page has been modified, UIDocument spends a LONG time in the background writing the changes (in writeContents:andAttributes:safelyToURL:forSaveOperation:error: ). Surely it should only be writing out this one small change to the file wrapper... what's taking so long? My contentsForType:error: override returns a new

Does NSFileWrapper load everything into memory?

青春壹個敷衍的年華 提交于 2019-11-29 07:48:32
Lets say I have an NSFileWrapper directory. This directory is made up of several levels of directories and files. Some of the files are large. Are all these files loaded into memory, or are they lazily loaded? If they are loaded into memory, are there any alternatives to NSFileWrapper with similar functionality that won't load files into memory? Something I can hook into UIDocument ? This is for a document based application, which uses UIDocument 's that are synced with iCloud. A document can have images and videos embedded inside it. Each image/video has a preview image (thumbnail) that is