【发布时间】:2020-03-31 23:57:46
【问题描述】:
我正在使用https://github.com/christopherdro/react-native-html-to-pdf 生成PDF files。
在Android 上,它们最终出现在我的下载文件夹中,一切都很好,但在 iOS 上,它们最终出现在:
/var/mobile/Containers/Data/Application/xxxxxxxxxx/Documents/xxxx.pdf
然后用户如何找到这些文件?我以为它们会在“文件”应用程序中可见,但事实并非如此。 我基本上是为 iOS 做的:
let options = {
html: '<h1>PDF TEST</h1>',
fileName: 'test',
directory: 'Documents',
};
我尝试过不提供目录,或者使用“docs”而不是“Documents”将它们放在同一个地方,但是 /temp 而不是 /Documents。
我做错了吗? iOS 用户应该如何定位/访问 PDF 文件,而无需通过一堆东西来访问该文件夹?是否可以让它们默认出现在“文件”中?
提前致谢。
【问题讨论】:
标签: ios iphone reactjs react-native native