Reputation: 151
I am developing an app which parses an Xml or RSS feeds of a magazine..The thing is I have to include an offline capability,ie save the previous results which were displayed in each cell(similar to the New York times app) and then display the saved ones when there is no network connection..
Please help me with the codewise explanation using Core data as I was suggested to use it for this particular task.
Will be of great help for me..
Looking forward for your replies
Regards and Thanks
Arun
Upvotes: 0
Views: 146
Reputation: 7550
OH Boy... CoreData.
Good bye 3-4 days of learning how this works. You wont regret learning about core data but there is a LOT.
@OhioDude has a great link. You can also. 1. Xcode > file > New Project. Select Navigation Based App, make sure the coredata checkbox is checked. Viola you have a project with all the core data templates. 2. There is other sample code on Apples website.
One of the tricky and cool things about core data is that you if you deploy a new version you have to write a template of how you app is to roll the data into the new structure.
During dev as I am changing the DB structure, I seem to get errors, so I just do a build>clean. And rename the string for the DB file to something new.
Good luck. Otherwise NSUserDefaults will be fine. Or just learn about PLIST's you can simply serialize a NSDictionarly object into a PLIST and save it to the disk in a few lines of code. SUPER easy and no stuffing around with CoreData.
Upvotes: 1