4

I am looking at the NSFileWrapper class, that combines many files into one logical file on iOS. (demo)

How do other platforms interact with this format? What occurs when this document type is sent over email/http?

makerofthings7
  • 60,103
  • 53
  • 215
  • 448

1 Answers1

0

When exporting a bundle document, you should compress it into a ZIP file. You can save the ZIP file with the same extension as your document format uses, but obviously that means your app will need to handle both the uncompressed and compressed variants of your file type. I asked a similar question to Apple Developer Technical Support, and they responded with the following:

The Mail activity does not accept NSURLs pointing to bundles/packages. In order to share a package-type document, you must compress it into a zip archive. Pass either the URL of the archive or an NSData object containing the archive data as the activity item.

Luke Rogers
  • 2,369
  • 21
  • 28