The most efficient method updating images - iphone

I am just after some advice re the most efficient method of adding new images to my App.
I need to store 80+ new 300 x 100 pixel images to my app every couple of weeks.
I am worried it will take to long to download these images in the background.
What is the most efficient method of updating and storing this image data?
Is the most efficient method simply releasing an update of the app to itunes?

you may use SDWebImage , and you don't have to worry about cache and etc
Web Image
This library provides a category for UIImageVIew with support for remote images coming from the web.
It provides:
An UIImageView category adding web image and cache management to the Cocoa Touch framework
An asynchronous image downloader
An asynchronous memory + disk image caching with automatic cache expiration handling
A guarantee that the same URL won't be downloaded several times
A guarantee that bogus URLs won't be retried again and again
Performances!

Related

Download UI contents from a URL in flutter

I am building a flutter app that will contain a lot of animated pictures and 3d objects. Many of those animations will be choosen based on the user choice of gender when registering for the first time. So one of the issues with flutter is that it normally takes a lot of storage and with this animations its gonna need even more storage. So I was wondering if there is a way to keep those animations online in some cloud or in firestore DB and then when the user register for the first time I download it and assign it to the UI to be permenantly there instead of like storing all these Gifs in the assets.
Any suggestiong to avoid storing all of the animations and images in the assets.
Since you said you have lots of images, I would suggest you use a dedicated server to store your images.
If you haven't any dedicated server, then you should use firebase to store your images.
You should follow this link to fetch images from firebase.
Also, you should follow this link to store your images in the cache & in the future fetch from the cache easily.

Pngs being purge when app goes in background

I am using AFNetworking to save image from a Url, it uses NSCache to cache the images from the requested urls. When app goes in background and phone is locked, png's are being purged but jpegs are not.I read there is some auto expiration policy in NSCache.
Please help me solve this weird issue.

iOS how to manage photos

I'm creating an iOS app that works with photos.
I have built apps that do similar things on Android, and know of some of the pains that images can bring with regard to storage and memory management.
Here are my questions:
How do I save a picture that I've taken & where do I save it to (is it sensible to save it with core data somehow?)?
How do I load a picture from wherever I've saved it to?
For a tableview with images, do I need some form of lazy loading (you do on Android), if so, can anybody recommend a tutorial or library?
How do I save a picture that I've taken & where do I save it to (is it sensible to save it with core data somehow?)?
Use the system imagepicker/taker UIImagePickerController and no dont store images in CoreData. As a general rule store them in the system photo library. Store the Asset Library URL as a reference.
Images can be stored in your App documents folder also.
How do I load a picture from wherever I've saved it to?
Use the API in the AssetsLibrary framework to retrieve pictures from the system store.
For a tableview with images, do I need some form of lazy loading (you do on Android), if so, can anybody recommend a tutorial or library?
No. Lazy loading is done for free by your UITableViewController implementation. There are a 1001 great UITableView tutorials on the web.

iPhone: Efficiently downloading images from a URL into iPhone App

In my iPhone app , I need to display the images from server.
I need to download it and save it from URLs.
There are roughly 20 images which I need to download.
What could be a way out where in performance doesnt decrease?
I have tried previously using NSData to convert the images into NSData and saving it to my app but it takes lots of time.
What could be a more easier and efficient way out?
I recommend using ASIHTTPRequest to download the images asynchronously, and display them when they're ready. By using the asynchronous interface of that class, your app can be responsive and continue to operate normally while, in the background, you wait for the data to be loaded.
ASIHTTPRequest is open source and free to use: http://allseeing-i.com/ASIHTTPRequest/
The code the Facebook app uses to download and display images has been open-sourced as part of the three20 library.
If you want to write your own networking code ASIHTTPRequest is a very useful library that includes features such as downloading directly to a file and queue management.

Downloading Images on iPhone - How does Facebook do it?

How does the Facebook app go about downloading/displaying the images in photo galleries? They appear to load in at varying times which would indicate some degree of threading? Surely the app doesn't spawn X amount of threads (where X is the number of pictures) as this would cause performance issues? Can anyone enlighten me as I would like to use something similar in my app (I will be regularly downloading a large amount of photos and displaying them in the app so downloading them one after another takes too long). Also, these photos change on a fairly regular basis so downloading once and cacheing isn't really an option.
Is there some kind of framework/solution around that might help me achieve something similar to Facebooks galleries?
Thanks,
Jack
The code the Facebook app uses to do this has been open-sourced as the three20 library. This functionality is provided in TTPhotoViewController.
Have a look at the LazyTableImages example from Apple. The images are downloaded asynchronously and have a reference back to where they are supposed to be displayed.
I would recommend you use this Library, ASIHTTPRequest, which is like an extended version of the NSURLRequest. I have been using it to download images for later display, asynchronously. It has a nice CACHE implementation which saves bandwidth and loading times on your app.