I’m using NSURLConnection to grab an XML file. I parse the XML file and then use it to populate Core Data.
If the NSURLConnection fails to connect (i.e. user has no internet connection), I just read the persistent data from Core Data.
However, I’m thinking… Is there a way that I can do a check on the XML file to see if it has updated from the last time I used it? So I can save redownloading/repopulating it if is unchanged?
Checking Last Modified on the file or something?
Anyone have a good solution for this?
Thanks!
This can be done by checking the http headers or etags.