xcode iOS 文档目录大小限制
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/13154160/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
iOS Documents Directory size limit
提问by DanM
I am creating FTP download app that downloads into Documents Directory, and I have simple questions. Does the Documents Directory have size limit and does the download files stay there permanently until the app is removed?
我正在创建下载到文档目录的 FTP 下载应用程序,我有一些简单的问题。文档目录是否有大小限制,下载文件是否永久保留在那里,直到应用程序被删除?
回答by Midhun MP
I don't know much about this, I had seen a comment in discussions.apple.comlike: There is a limit of 2 GB.
我不知道很多关于这一点,我已经看到在评论discussions.apple.com这样的: 有2 GB的限制。
https://discussions.apple.com/message/7599983?messageID=7599983#7599983?messageID=7599983
https://discussions.apple.com/message/7599983?messageID=7599983#7599983?messageID=7599983
Files in the document directory stay there permanently until the app is removed.
文档目录中的文件永久保留在那里,直到应用程序被删除。
回答by traximus
============EDIT=========
============编辑==========
the fact is: 2Gb is the app size limit, and the app's directory can more than 2Gb; I found it from apple doc is here, search keyword "2G"
事实是:2Gb 是应用程序的大小限制,应用程序的目录可以超过 2Gb;我从apple doc找到它在这里,搜索关键字“2G”
I don't know if apple did some change, I use an app named PPTV, it can store videos from server, and more than 2Gb; what happens?
不知道苹果有没有改,我用的是一个叫PPTV的app,可以存储服务器上的视频,2Gb以上;发生什么了?
回答by Bhupendra
You should use Cache Directory if you want to cache anything without user's action or your app will get rejected if you dont follow the instructions:
如果您想在没有用户操作的情况下缓存任何内容,您应该使用缓存目录,否则如果您不按照说明操作,您的应用程序将被拒绝: