Muppa Divya
Muppa Divya

Reputation: 53

Cordova build with Xcode SQLite plugin

I am trying to build cordova (phone gap 2.9) application on xcode. I followed the tutorial from http://vimeo.com/56673251 and generated the sencha app. I am able to use cordova builder and get the xcode project. But when i build my xcode project I get bunch of linker errors as follows:

"_sqlite3_last_insert_rowid", referenced from:
      -[SQLitePlugin executeSqlWithDict:andArgs:] in SQLitePlugin.o
  "_sqlite3_open", referenced from:
      -[SQLitePlugin open:] in SQLitePlugin.o
  "_sqlite3_prepare_v2", referenced from:
      -[SQLitePlugin executeSqlWithDict:andArgs:] in SQLitePlugin.o
  "_sqlite3_step", referenced from:
      -[SQLitePlugin executeSqlWithDict:andArgs:] in SQLitePlugin.o
  "_sqlite3_threadsafe", referenced from:
      -[SQLitePlugin open:] in SQLitePlugin.o
  "_sqlite3_total_changes", referenced from:
      -[SQLitePlugin executeSqlWithDict:andArgs:] in SQLitePlugin.o
ld: symbol(s) not found for architecture i386

Any help on this would be great.

Upvotes: 0

Views: 765

Answers (1)

GenieWanted
GenieWanted

Reputation: 4513

You need to add libsqlite framework in order to use SQLitePlugin in your Xcode. To do that, click on your Project file --> Targets --> Build Phases --> Link Binary with Libraries --> Press + button and add libsqlite3.dylib or libsqlite3.0.dylib.

Now, after doing this, clean the project and run.. Should do..

Good luck!

Upvotes: 1

Related Questions