Import sqlite3.h into Swift project through Obj-C bridge header not working

I created a file with a name BridgingHeader.hand contains only one line:

#import <sqlite.h>

And, of course, the infrastructure is imported libsqlite3.dylib.

In my build settings, I also set the Objective-C Bridging Header to<ProjectName>/Bridging-Header.h

BUT ...

When I add import sqlite3Swift to my class, it says that it cannot find the module sqlite3.

+4
source share
2 answers

For those who want to use SQLite 3 directly, see this Gist:

https://gist.github.com/zgchurch/3bac5443f6b3f407fe65

+6
source

@trojanfoe , Objective-C sqlite3. (FMDB)

, ObjC BridgingHeader.h , Swift.

: Objective-C ...

+2

Source: https://habr.com/ru/post/1543764/


All Articles