I am working on a blog app where the different articles are shown in a table view. I am using the following code to refresh:
for (NSString *feed in _feeds) {
NSURL *url = [NSURL URLWithString:feed];
ASIHTTPRequest *request = [ASIHTTPRequest requestWithURL:url];
[request setDelegate:self];
[_queue addOperation:request];
}
This works fine when there is an error and nothing ever loads, but if all loads fine and you are just looking for new articles, it ends up duplicating everything. Here is the viewDidLoad settings as well:
self.allEntries = [NSMutableArray array];
self.queue = [[[NSOperationQueue alloc] init] autorelease];
self.feeds = [NSArray arrayWithObjects:@"http://316apps.com/ipreachersblog/feed/",
nil];
Any suggestions for what I can do to only add articles that are new since the original load?
What if you came up with some kind of checksum for the articles?
The checksum would then service as a unique identifier for articles.