Edit Article

Edited by Teresa, Carolyn Barratt

Using SQLite databases can be confusing and hard to do for beginners to the Cocoa/Objective-C language. This guide will show you how to easily get started using SQLite. A basic knowledge of Objective-C and Cocoa are recommended.

EditSteps

  1. 1
    Download the FlyingMeatDatabase API.
  2. 2
    Create a new project in XCode or open an existing project.
  3. 3
    Create a new Group in your Linked Frameworks folder and name it "FMDB".
  4. 4
    Click and drag the files in the "fmdb/src/" directory into the group you created. The "fmdb/src/" directory can be found in the downloaded/checked out directory. MAKE SURE NOT TO DRAG "fmdb.m".
  5. 5
    If prompted, check Copy Files.
  6. 6
    Right click on Linked Frameworks and click on Add > Existing Framework.
  7. 7
    Find "libsqlite3.dylib" in the Frameworks list. To make this step easier, you can choose to filter the Frameworks by dylibs only.
  8. 8
    Copy files if prompted.
  9. 9
    You're now set up to use FMDB as well as Sqlite databases.
  10. 10
    View this sample code to see how it works.
Add your own method
Save

Article Info

Categories: Operating Systems

Recent edits by: Teresa

Thanks to all authors for creating a page that has been read 5,827 times.

Was this article accurate?

YesNo