Please note, this blog entry is from a previous course. You might want to check out the current one.
If you were to use your application for weeks, your database would start to get huge! Implement a mechanism for pruning your database over time. For example, you might want to delete photos a week after you download them?
Add an additional date attribute created to the Photo entity to store when a photo has been added to the database. (Don’t forget to recreate its sub class).
Set the new attribute when a photo is added:
+ (Photo *)photoWithFlickrInfo:(NSDictionary *)photoDictionary
inManagedObjectContext:(NSManagedObjectContext *)context
existingPhotographers:(NSMutableArray *)photographers
existingRegions:(NSMutableArray *)regions
{
...
photo.created = [NSDate date];
...
}
Continue reading “cs193p – Assignment #6 Extra Task #3”