Building BNRFeedStore
The code that was removed from ListViewController must be replaced in BNRFeedStore. The BNRFeedStore must handle preparing the NSURLRequest, kicking off the NSURLConnection, handling the response from the server, and starting the parser. The ListViewController simply asks for these actions to be initiated and supplies a callback for when they are completed.
Initiating the connection
A store’s job is to take a really simple request from a controller, like “fetch the RSS feed,” and prepare a detailed request tailored for the external source it interacts with. In this case, the detailed request is the web service call to http://forums.bignerdranch.com. In BNRFeedStore.m, begin implementing fetchRSSFeedWithCompletion: by preparing ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access