Is it possible to persist PubSub framework objects in a Core Data persistent store? Or is there a better way to do this…? I’m working on an RSS reader and looking for ways to cache RSS/Atom feeds retrieved by PubSub..
Thanks in advance
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
It is possible to persist PubSub objects in the persistent store, however, I am not sure if it is needed as I believe those objects are persisted in an operating system database.
Regardless, to do this, all you have to is add a transformable property, i.e. feedObject. The docs have a good explanation of how to do this:DOCS
The only real trick is that you have to import the PubSub framework on the Entity header file.
Like I said though, the feeds and associated entries are all persisted (I believe) in the operating system as long as you subscribe to the feed. The only time it retrieves entries is (a) when you first subscribe to a feed and (b) when it decides that is time to refresh the feed.
If you don’t subscribe to the feed and you are only taking the feeds manually then you might want to consider adding them to your persistent store.