SQLite for iPhone SDK

POSTED BY niklas on Mar 14 under Technology

After asking on the MacRumors forums I was pointed back to FMDB that I had looked at a couple of days ago. FMDB is a Cocoa wrapper for SQLite3. I had a look at it, and after my initial difficulties, I found that I was trying a way to complicated way to use it for my iPhone applications. To add FMDB, simply do the following:

Leave a Comment

If you would like to make a comment, please fill out the form below.

Name (required)

Email (required)

Website

Comments

6 Comments so far
  1. Josh E March 15, 2008 8:36 am

    Hi Niklas,

    Thanks for the tip!

    I’m particularly interested in accessing the sqlite databases where Apple stores sms messages and call histories. Have any idea’s there?

    Cheers,
    Josh

  2. niklas March 16, 2008 12:07 am

    Sorry, I haven’t looked at accessing the rest of the system, I’m just working within the applications I’m writing at the moment

  3. Oskar March 18, 2008 6:28 am

    I’m quite a newb so thanks for the tips, but after following these steps I get this Xcode error:

    duplicate symbol _main in …/fmdb.o and …/main.o

    I already have a file with a main method, so how do I include FMDB?

  4. Oskar March 18, 2008 6:41 am

    Ah, nevermind, I looked at the source closer and realized that fmdb.o is not part of the actual FMDB wrapper.

  5. Oskar March 18, 2008 6:42 am

    Nevermind, I checked out the source more and realized that fmdb.m is not part of the wrapper itself.

  6. Seb March 27, 2008 4:36 am

    Thanks for posting that info. I have been trying to figure out how to use SQLite on iPhone for a while now. I’ll give it a shot and report back.

Copyright Niklas Saers, 2000-2008