How to handle NSFileWrapper files sent by email to iOS platforms?

I am considering the NSFileWrapper class, which merges many files into one logical file on iOS. ( demo )

How do other platforms interact with this format? What happens when this type of document is sent via email / http?

+4
source share
1 answer

When exporting a document with a package, you must compress it to a ZIP file. You can save a ZIP file with the same extension as your document format, but obviously this means that your application must handle both compressed and compressed versions of your file type. I asked a similar question to Apple Developer Technical Support, and they answered as follows:

Mail activity does not accept NSURLs indicating packages / packages. To split a package type document, you must compress it into a zip archive. Pass either the archive URL or the NSData object containing the archive data as an activity element.

0
source

Source: https://habr.com/ru/post/1654154/


All Articles