The following steps were successfully done:
- add libsqlite3.dylib in (general/Frameworks and libraries)
- Project explorer: create under root a new group called "module"
- in module group create a new file module.map
- 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.
-
add module.map to Build settings -> Swift compiler -> Search paths -> Import paths
-
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