Version 5.1, 2015-12-03 Upgraded to the iOS 9.0 SDK, now uses NSURLSession, updated to adopt current best practices for Objective-C (including use of properties, autosynthesis, and literals). (Full Revision History)
iOS 9.0 SDK or later
iOS 8 or later
This sample code demonstrates efficiently parsing and importing data from an XML RSS feed into Core Data. The feed is from iTunes Top Songs and contains data about songs, artists, and categories. The application's data model has an entity for Song and for Category. Managed objects are inserted into a managed object context on a background thread, so the application remains responsive to the user while the import is taking place.