Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在查看 NSFileWrapper 类,它在 iOS 上将许多文件组合成一个逻辑文件。(演示)
其他平台如何与这种格式交互?当通过电子邮件/http 发送此文档类型时会发生什么?
导出捆绑文档时,应将其压缩为 ZIP 文件。您可以使用与文档格式相同的扩展名保存 ZIP 文件,但显然这意味着您的应用程序需要处理文件类型的未压缩和压缩变体。我向 Apple Developer Technical Support 提出了类似的问题,他们的回复如下:
Mail 活动不接受指向包/包的 NSURL。为了共享包类型的文档,您必须将其压缩为 zip 存档。传递存档的 URL 或包含存档数据的 NSData 对象作为活动项。