views:

477

answers:

4

I've heard that it's a bad idea to use plain SQLite3 in an iPhone project. Which frameworks, libs, wrappers, etc. do you use? Which are worth looking at?

+5  A: 

Core Data is the way to go. It's only available in iPhone OS 3.0. This's not likely to be a problem though (for new apps).

Mehrdad Afshari
Yes, I just upgraded to 3.0 just to get Core Data. So far, it looks pretty awesome.
Paul Tomblin
+4  A: 

I have used C-API to SQLite on the iPhone and have no complaints at all. On the contrary, it works great.

If you are planning to use Core Data, you'll be stuck with iPhone OS 3.0. If that's not a problem with you, you can go ahead and use it. But I guess, many people will still be using iPhone OS 2 during 2009.

Pablo Santa Cruz
+2  A: 

Same here, I recently had an app accepted by the App Store using SQLite to store its data.

This link I found especially useful: iPhone SDK Tutorial: Reading data from a SQLite Database

Section (4) includes details of changes that you need to make to include the SQLite framework to your link options.

(The main section of the tutorial shows you which files to import/include)

Neosionnach
+2  A: 

If you need to target iPhone 2.0, or if you want the ability to write specifically targeted SQL without resorting to use of the C API, I can recommend Gus Mueller's FMDB. This (along with the latest SQLite amalgamation for multithreaded access support) is what I use in Outpost.

Jim Dovey