Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to correctly add sqlite frameworks to the Xcode project?

I am trying to add SQLite to my project.I checked the target dependencies under the build phase tab,it is empty, which is true.I am getting the following error:Unable to run command 'Ld SQLite' - this target might include its own product."

I am using swift 3. Can you please help me? Thanks in advance

like image 520
matlabuser Avatar asked Jan 23 '18 18:01

matlabuser


People also ask

How do I see SQLite database in Xcode?

Open Finder, press Shift + Command + G, paste the path and press Go. Use DB Browser for SQLite to view the . sqlite file.

How do I open SQLite database in iOS Swift?

File ▸ New ▸ Project…. Choose the iOS ▸ Application ▸ Single View App template and create a new project. Step 1: First copy . sqlite file from FileManager to application.

Does SQLite use Coredata?

Core Data can use SQLite as its persistent store, but the framework itself is not a database. Core Data is not a database. Core Data is a framework for managing an object graph. An object graph is nothing more than a collection of interconnected objects.


1 Answers

I'm not in front of a Mac at present, but I think all you need to do under Build Phases is go to Link Binaries with Libraries, hit the add button and type in "sqlite" so you can select libsqlite3.

like image 125
Stonetip Avatar answered Sep 19 '22 14:09

Stonetip