I am developing an iOS app that will have a number of images. These images are associated with Show object and Band objects. I am fairly new to iOS development
On the server, the Shows and Bands are associated with a list of images. Currently I am storing the images with the following info:
height:integer width:integer imageType:string imageData:binary
First question is: should there be more?
Secondly, I am persisting the Show and Band objects using Core Data. I do not want to persist the images because I would quickly run out of memory. I will store them in the cache directory. My second question is: how should the Show and Band objects keep track of the images? Should I have a Image objects in the model with a to many relationship with Shows and Bands. But these Image objects would perhaps only contain height, width, imageType and a path to where the cached image should be. My idea is that if it is not found in the cache directory, it gets the imageData from the server.
What is the right way to do this?
UPDATE
I also plan on pinging the server with HEAD to check if the imageData has been updated before getting the cached version.