I've seen several posts on this, and I've followed and rechecked the suggestions, but I still get
Use of undeclared type 'sqlite3'
My BridgingHeader.h file contains
#ifndef areabook_Bridging_Header_h
#define areabook_Bridging_Header_h
#import <sqlite3.h>
#endif
(The Link Binary With Libraries has libsqlite3.0.dylib. I have also used libsqlite3.dylib. The build never gets to the link phase so this is not the problem.)
BridgingHeader.h is referenced in the build setting Objective-C Bridging Header. I know I have BridgingHeader.h referenced correctly because if I change
<sqlite.h> to <sqlitexx.h>
the compiler gives the error
'sqlite3xx.h' file not found
and I don't get the error when I use the correct name (sqlite.h).
Using sqlite.h in BridgingHeader.h, the compiler gives this error in my swift code.
import UIKit
class Db: NSObject {
var database: sqlite3 = nil
Use of undeclared type 'sqlite3'
. . .
What, oh what, am I missing?