Cordova使用Xcode SQLite插件构建

时间:2013-08-22 06:44:24

标签: ios xcode cordova

我正在尝试在xcode上构建cordova(手机间隙2.9)应用程序。我按照http://vimeo.com/56673251中的教程生成了sencha应用程序。我能够使用cordova构建器并获得xcode项目。但是当我构建我的xcode项目时,我得到了一堆链接器错误,如下所示:

"_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

对此的任何帮助都会很棒。

1 个答案:

答案 0 :(得分:1)

您需要添加 libsqlite 框架才能在Xcode中使用SQLitePlugin。为此,请单击您的项目文件 - >目标 - >构建阶段 - >链接二进制文件与库 - >按+按钮添加libsqlite3.dyliblibsqlite3.0.dylib

现在,执行此操作后,清理项目并运行..应该做..

祝你好运!