1

I'm writing an app which saves and loads documents both locally and on iCloud. Locally is working fine, but I'm having a problem with iCloud.

The documents are saved as a package - the UIDocument reads and writes an NSFileWrapper which contains an image file, a thumbnail file, and an info plist. When I save the document to iCloud and then look at the files under 'Manage Storage', I see the individual files instead of the packages; and more importantly when I search for files using NSMetadataQuery it returns an NSMetadataItem for each of the individual files instead of the packages. As a result, my app doesn't realise there are any packages to load and iCloud is pretty useless.

I thought that if I set up the document type and exported the UTI correctly that the packages would be treated properly. Was that right? If so, what's the checklist for setting up a document type as a package?

Nabeel Thobani
  • 939
  • 10
  • 23
  • Same problem here. Something must be wrong with the document definition… I'm still investigating. – Mark Jan 22 '14 at 08:03
  • I am having the same problem. Did add com.apple.package to the "Exported UTIs" and also to Document Types ("Types" field). Though I do not have an icon, is the icon required? – bio Oct 10 '15 at 14:34

1 Answers1

2

I had fixed this issue by adding an object (add com.apple.package) in conforms to UTIs array (in plist file)

Nabeel Thobani
  • 939
  • 10
  • 23
  • Perhaps accept your own answer if that is possible? So that other people know that this was the correct solution. – svena Jun 15 '16 at 20:59