Iphone store image (pitfalls ?)
I have an application
that loads images from the net and stores it on the app's documents directory so when the users starts up the application and doesn't have internet they still can use the application.
but my question is .. does the iphone controls that document directory ? does it clears itself after a certain period or after a certain开发者_高级运维 amount of memory is used .. does the documents directory have a limit ? and what if the limit is reached ?
anyone can clear that up ?
In "Commonly used directories" section in application programming guide you can see that date can be stored in several directories: Documents, Library/Caches and tmp. Files in Documents and Caches directory persist between launches so you can store your data in either of them.
One more thing to consider is backup process - Documents directory is backed up by iTunes and Caches is not so storing large files or files that change a lot in Documents directory may significantly increase device synchronizing time (see "Backup and restore" section for details).
As answered here your application disc space is limited by 2GB, not sure what will happen if you hit that limit though.
精彩评论