0

i want to store some managed objects as to make searching later on easier, what is the best way to do that? (So that it survives exiting the app)

I am thinking user defaults (but im not sure if you can store managed objects like this)

Or some sort of cache?

William Falcon
  • 9,813
  • 14
  • 67
  • 110

1 Answers1

0

SO, although I am not sure this is the best way to do it, here is how I fixed this issue. I was looking for a way to preload a list of results that would persist through launches.

To accomplish this I created an NSMangedObject, called it HistoryObject, and added a relationship (to-many) to the object I wanted to store. I added those objects to this object (basically an NSManagedObject array of objects), and retrieve this object whenever I want to load the subObjects...

William Falcon
  • 9,813
  • 14
  • 67
  • 110