Storage Data in iPhone

A few ways to store application data on your iPhone.

SQLite DB: The DB used by iOS development, you can interact with this directly depending on your preferences (e.g. you want to use SQL statements).

CoreData: Abstraction to SQLite DB so you can remove SQL statements and use the API instead. The advantage of this is it's compatibility with the Cocoa API. In our production applications we use CoreData over SQLite.

File System: You can store files directly here and use a convention. You might also want to read about using the cache folder iOS development for temporary data.


XML: Case to case. In commercial applications, we only use XML for interfacing among systems. E.g. iPad to Cloud server.


UserDefault: only for parameters.


NSUserDefaults is a convenient tool for storing user credentials but is not intended for larger volumes of data.


Plist files are another option if you want to manage your own storage on the file system. NSArray and NSDictionary provide methods for writing and reading those collections to and from plist files as long as you can store all of your data in one of the supported plist data types.