开发者

ios native app allowed to save data from web?

开发者 https://www.devze.com 2023-02-26 02:43 出处:网络
We\'re building an iPad photo gallery with hundreds of images (almost 300mb i开发者_JAVA百科n size). Having a web app will be a disadvantage because users will have to download the images every time (

We're building an iPad photo gallery with hundreds of images (almost 300mb i开发者_JAVA百科n size). Having a web app will be a disadvantage because users will have to download the images every time (since Safari on ipad won't cache them I'm guessing?)

So if we built a native ios app instead, would it be possible to download newer images from the web and add it to the app in the future?

Thanks a ton for your help !


Each iPhone application has its own home directory containing Library and Documents folders, and a tmp directory for storing temporary files.

Take a look at section title: A Few Important Application Directories on The Application Runtime Environment.

I would save the your images to Application Home/Library/Caches folder.

Excerpt from Apple Docs:

Use this directory to write any application-specific support files that you want to persist between launches of the application or during application updates. Your application is generally responsible for adding and removing these files. It should also be able to re-create these files as needed because iTunes removes them during a full restoration of the device. In iOS 2.2 and later, the contents of this directory are not backed up by iTunes.


http://iosdevelopertips.com/data-file-management/save-uiimage-object-as-a-png-or-jpeg-file.html

you could download it on first view, display at the uiimage, then save it off as above

0

精彩评论

暂无评论...
验证码 换一张
取 消