简体   繁体   English

如何限制iPad中文件应用程序的大小?

[英]how can i do Limit the file app size in ipad?

I want to write a app to download and manage files from the web. 我想编写一个应用程序以从网络下载和管理文件。 If I just put the file in the Document. 如果我只是将文件放在文档中。 Is there any limit of file size in the Directory? 目录中的文件大小有限制吗?

can any one help me.. 谁能帮我..

thanks in advance. 提前致谢。

Just a warning with the introduction of iOS5 saving large files or files that can be regenerated into the documents directory is frowned upon (actually you were never meant to do it but its only being enforced now). 引入iOS5保存大型文件或可以将其重新生成到documents目录的文件只是一个警告(实际上您从不打算这样做,而只是现在强制执行)。 This is because the files in the documents directory get backed up to iCloud and you obviously do not want to fill that up. 这是因为documents目录中的文件已备份到iCloud,并且您显然不想填充它。 Apple have started rejecting apps just for this reason. 苹果正因为这个原因开始拒绝应用程序。

You should now place the downloaded files into the temp or cache directories. 现在,您应该将下载的文件放入temp或cache目录。 But also be aware that the OS will clear these directories when running low on memory so you need to have logic in you app to check if the files exist and re-download if they do not. 但也要注意,当内存不足时,操作系统会清除这些目录,因此您需要在应用程序中包含逻辑以检查文件是否存在,如果不存在则重新下载。

No real limit except the device and other user data. 除设备和其他用户数据外,没有实际限制。 Still best to be frugal. 还是要节俭。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM