Closed torcelly closed 9 years ago
I've never actually tried, does parseFeedURL:
not work with file URLs for some reason?
I tried
NSString *path = ...
NSURL *url = [NSURL fileURLWithPath:path]
and then parseFeedURL:
but it doesn't work. :(
If this is iOS you'd probably need to do something like
[NSURL fileURLWithPath:[[NSBundle mainBundle] pathForResource:@"fileName" ofType:@"html"]]
If the feed xml is downloaded and cached, it is not a resource in main bundle. It's a file stored in "cache" folder in app sandbox. So I can't get it calling NSBundle.
Ok let me take a look, I feel like NSURLRequest should be able to handle file URLs, so I'm not sure what's up.
This should work if you're getting the URL from an NSFileManager
using something like URLsForDirectory:NSDocumentDirectory inDomains:NSUserDomainMask
. If you can't get that to work let me know. Also this PR seems to make a lot of unnecessary changes to the repository, so I'm going to close it for now. If you think the feature is still worthwhile please clean up the PR and open it back up.
Sometimes is useful cache the feed XML. The methods added allow parse feeds stored in disk (cached).