Reputation: 3305
Where should I store folder and file info on iPhone/iPad? The app I'm writing is connecting to remote server, parsing XML files and downloading images into the folders in app/Documents/. There are 2 XML files on server. Directory-list and File-list.
Directory XML list:
<dir>
<name>User Friendly Folder Name</name>
<realname>201001_unfriendly_name</name>
</dir>
File XML list:
<file>
<filename>somename.jpg</filename>
<title>Awesome!</title>
<description>this is some image</description>
</file>
I would like to store the and data related to files as well as user-friendly folder names (). I am considering creating similar XML files on device but maybe there is some faster way that doesn't require XML? Would the database be useful here?
Upvotes: 0
Views: 121
Reputation: 6991
I would use a database, CoreData should be for you.
If you don't feel like using CoreData you might want to use sqlite3, where CoreData is built upon. sqlite3 allows you to save a lot of data ( I saved 800 rows in 0.11 seconds on an iphone 4 ) to the disk without lagging. Implement it in the incorrect way and you will be stuck with 85 rows a second. So you might want to use FMDB which is a sqlite3 wrapper written in objective-c
Upvotes: 1