mercredi 5 août 2015

Using sqlite3 in swift framework (step by step) XCode 6.4


The following steps were successfully done:

  1. add libsqlite3.dylib in (general/Frameworks and libraries)
  2. Project explorer: create under root a new group called "module"
  3. in module group create a new file module.map
  4. edit the module.map as following

module sqlite3 [system] { header "/Applications/http://ift.tt/1DtlgVE"

link "sqlite3"

export *

}

Using a terminal check the above sqlite3.h path to be sure that is there and adapt it if you have new/older OS release.

  1. add module.map to Build settings -> Swift compiler -> Search paths -> Import paths

  2. create your swift class and #import sqlite3

Deepening on XCode version you might encounter the following issue

"opening import file for module 'Swift': Not a directory"

Make sure the module.map is well specified in settings.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire