如何处理通过电子邮件发送到非iOS平台的NSFileWrapper文件?

前端之家收集整理的这篇文章主要介绍了如何处理通过电子邮件发送到非iOS平台的NSFileWrapper文件?前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我正在查看NSFileWrapper类,它将许多文件组合到iOS上的一个逻辑文件中. ( demo)

其他平台如何与这种格式互动?通过电子邮件/ http发送此文档类型时会发生什么?

解决方法

导出捆绑文档时,应将其压缩为ZIP文件.您可以使用与文档格式相同的扩展名保存ZIP文件,但显然这意味着您的应用程序需要同时处理文件类型的未压缩和压缩变体.我向Apple Developer Technical Support提出了类似的问题,他们回答了以下问题:

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.

@H_404_22@

猜你在找的iOS相关文章