NSXMLParser initWithContentsOfURL:

In digging around looking at errors I was getting with the NSXMLParser when using the

- (id)initWithData: (NSData *)data;

initializer, I discovered the

- (id)initWithContentsOfURL: (NSURL *)url;

initializer. This initializer handles all the connection logic without me having to deal with it. Since the reality of this application is, if you can’t download the data from the server, you can still use the app with data that you’ve downloaded previously, there’s no need for me to maintain the downloading separately.

I’m no longer using the RSSDownloader class, or the RSSDownloaderDelegate protocol. Since the only other case of downloading is to get the audio file for a specific message, I probably don’t need the abstraction of moving the download logic to a separate controller class. That, however, is an issue for another time.

This entry was posted in iOS, Objective-C, Sound Church, XCode and tagged , , . Bookmark the permalink.

Comments are closed.