Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you enable FTS in Xcode for an iOS app?

I would like to enable FTS in an iOS app. Do I need to include the SQLite binaries, or is there a CFLAG or something I can add to enable it? Do I have to include the amalgamation source?

like image 661
Stephan Heilner Avatar asked Jun 06 '13 21:06

Stephan Heilner


1 Answers

I discovered that FTS is already included in the sqlite framework included in Xcode. To enable it, do the following:

1) First, include the libsqlite3.dylib framework to your project.

2) Then add the following CFLAGS:

-DSQLITE_ENABLE_FTS3_PARENTHESIS
-DSQLITE_ENABLE_FTS3

For what its worth, FTS4 works as well, just change the CFLAGS to:

-DSQLITE_ENABLE_FTS4_PARENTHESIS
-DSQLITE_ENABLE_FTS4

like image 166
Stephan Heilner Avatar answered Oct 22 '22 15:10

Stephan Heilner