Storing custom objects in an NSMutableArray in NSUserDefaults

后端 未结 5 1616
情深已故
情深已故 2020-11-22 16:11

I\'ve recently been trying to store the search results of my iPhone app in the NSUserDefaults collection. I also use this to save user registration info successfully, but fo

5条回答
  •  粉色の甜心
    2020-11-22 16:33

    I would recommend against trying to store stuff like this in the defaults db.

    SQLite is fairly easy to pick up and use. I have an episode in one of my screencasts (http://pragprog.com/screencasts/v-bdiphone) about a simple wrapper that I wrote (you can get the code without buying the SC).

    It's much cleaner to store app data in app space.

    All that said if it still makes sense to put this data into the defaults db, then see the post f3lix posted.

提交回复
热议问题