Apple 引入了文件共享支持,这是 iPhone 3.2 的新功能。详细信息可以在 https://developer.apple.com/iphone/library/releasenotes/General/WhatsNewIniPhoneOS/Articles/iPhoneOS3_2.html#//apple_ref/doc/uid/TP40009337-SW1 。
现在,网络上流传的大多数示例都演示了如何写入文档目录。如果我想从应用程序写入文件,但不希望用户能够通过 iTunes 查看该文件,该怎么办?我正在查看 iPhone OS 编程指南的文件和网络部分,我不确定什么是文档目录的良好替代方案,用于编写文件以隐藏用户且不会被 Apple 审核团队拒绝。
New to iPhone 3.2, Apple introduced File-Sharing support. Details can be found at https://developer.apple.com/iphone/library/releasenotes/General/WhatsNewIniPhoneOS/Articles/iPhoneOS3_2.html#//apple_ref/doc/uid/TP40009337-SW1 .
Now, most examples floating around in the web demonstrates writing to the documents directory. What if I want to write files from my app but I don't want the user to be able to see it via iTunes? I'm looking at the Files and Networking section of the iPhone OS Programming Guide and I'm unsure what would be a good alternative to the documents directory for writing files to hide from the user and not be rejected by Apple's review team.
发布评论
评论(2)
如果数据不需要每次启动时都保留,您可以使用 Temps 文件夹。顾名思义,它是一个易失性(跨启动)文件夹。
If the data doesn't need to persist each launch you could use the Temps folder. Aptly named, it is a volatile (across launch) folder.
您可以使用库目录代替文档目录:
You can use the library directory instead of the document directory: