Swift Can't Import Sqlite3 iOS
ios, swift
Solution
Add it to your Bridging-Header.h file:
#import <sqlite3.h>
This is the primary mechanism for importing any C-language libraries.
If you don't yet have a Bridging-Header.h file:
- Add a file Bridging-Header.h (or more typically (ProjectName)-Bridging-Header.h
- Go to the build settings tab for your project
- Find "Objective-C Bridging Header". The easiest way is to search for bridging.
- Enter the name and path for the file you created in step one. It's probably (ProjectName)/(ProjectName)-Bridging-Header.h
Problem
I added `libsqlite3.0.dylib` to my project, and then I tried to import using the following code: ``` import UIKit import sqlite3 class Dataware: NSObject { } ``` But it's giving me this error: No Such Module 'sqlite3'